tag: keyboard

Mapping Print Screen (PrtSc) to Context Menu (right mouse click) in Wayland/Sway

6 May, 2020 - 2 minutes
Back in ye olden days, I used to set this in my i3 config. exec_always --no-startup-id "xmodmap -e 'keycode 107 = Menu'" Now though, I’ve no idea what I’m doing. This is a brain dump post, detailing how I remapped PrtSc to Menu. Find keycodes xev -event keyboard Running the above and pressing print screen will look like this: KeyPress event, serial 28, synthetic NO, window 0x2400001, root 0x39c, subw 0x0, time 163760698, (527,424), root:(1807,424), state 0x0, keycode 107 (keysym 0xff61, Print), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False Now we know the keycode is 107, keysym is 0xff61, ‘Print’.