Steam side menu with kb + m

How can we access the steam side menus with keyboard and mouse when using the gamescope session? CTRL + 1 and CTRL + 2 do not work when I am ingame. Are there any other solutions to access the menus ingame without a game controller?
14 Replies
antheas
antheasβ€’8mo ago
you can open the main menu with shift+tab the qam can only be opened by the steam deck and xbox+a unfortunately hopefully the shift+tab works in game mode
Kyle Gospo
Kyle Gospoβ€’8mo ago
Ctrl + 1 and Ctrl + 2 should work iirc
Shengol0l
Shengol0lOPβ€’8mo ago
Neither the CTRL combinations or shift tab work in-game. I guess we will need to find a solution to virtually press an xbox guide button without an attached controller. (I want to use bazzite for consolification of my pc, but still, kb + m games will be played on my main monitors). Thank you for your input so far πŸ™‚
antheas
antheasβ€’8mo ago
only works outside games shift tab works in desktop at least ctrl + 1 does work if you do some cursed magic and i have tested it if youre up for writing some python
Shengol0l
Shengol0lOPβ€’8mo ago
Please tell me, I am a full time dev, I am very open for cursed solutions
antheas
antheasβ€’8mo ago
I need to pull up my Jupyter notebook If I forget and don't by tomorrow ping me
Shengol0l
Shengol0lOPβ€’8mo ago
@antheas 😁
antheas
antheasβ€’8mo ago
just looked for it cant seem to find it one min
from hhd.plugins.overlay.x11 import get_gamescope_displays, get_overlay_display
from Xlib import XK, X
from Xlib.ext.xtest import fake_input

# https://stackoverflow.com/questions/13840697/xlib-control-keyboard-events

res = get_overlay_display(get_gamescope_displays())

assert res
disp, name = res

get_key = lambda k: disp.keysym_to_keycode(XK.string_to_keysym(k))
KCTRL = get_key("Control_L")
K2 = get_key("2")

fake_input(disp, X.KeyPress, KCTRL)
fake_input(disp, X.KeyPress, K2)
disp.sync()
fake_input(disp, X.KeyRelease, KCTRL)
fake_input(disp, X.KeyRelease, K2)
disp.sync()
from hhd.plugins.overlay.x11 import get_gamescope_displays, get_overlay_display
from Xlib import XK, X
from Xlib.ext.xtest import fake_input

# https://stackoverflow.com/questions/13840697/xlib-control-keyboard-events

res = get_overlay_display(get_gamescope_displays())

assert res
disp, name = res

get_key = lambda k: disp.keysym_to_keycode(XK.string_to_keysym(k))
KCTRL = get_key("Control_L")
K2 = get_key("2")

fake_input(disp, X.KeyPress, KCTRL)
fake_input(disp, X.KeyPress, K2)
disp.sync()
fake_input(disp, X.KeyRelease, KCTRL)
fake_input(disp, X.KeyRelease, K2)
disp.sync()
should run on bazzite as the deps are preinstalled didnt test ingame tho my previous script sent it directly tos team but i appear to have lost it works
Shengol0l
Shengol0lOPβ€’8mo ago
Thanks, I will try it out later. How do you execute the script from within the gamescope session? I will probably just use bind to bind the script to a key combo.
antheas
antheasβ€’8mo ago
Run it as your user works anywhere In fact I added it to hhd Next version will use that for qam
Shengol0l
Shengol0lOPβ€’8mo ago
Thats a good idea. I did not even consider using hhd because I use bazzite on a desktop pc. Thank you again!
antheas
antheasβ€’8mo ago
you dont need it, you just need the code from the x11 file and python-xlib i just assumed you had it yes it will work on the deck image
Shengol0l
Shengol0lOPβ€’8mo ago
Yes, I understood. I just meant that it is a good idea to bind the functionality via hhd, generally speaking
antheas
antheasβ€’8mo ago
dont have keyboard or external controller support yet but it would be good to add for sure
Want results from more Discord servers?
Add your server