corvore Now • 100%
Found an answer! For those needing help with similar things, here's a link: https://www.reddit.com/r/swaywm/comments/kiybht/enabledisable_touchpad_with_keyboard_shortcut/
And a copy/paste:
You can toggle your touchpad with swaymsg input type:touchpad events toggle enabled disabled
Find out what Fn+F1
actually gets reported as, either by running wev or xev, focusing the window it creates, and typing Fn+F1
For example, me running wev -f wl_keyboard
and then typing Fn+F9
:
[14: wl_keyboard] key: serial: 126015; time: 225412042; key: 199; state: 1 (pressed)
sym: XF86TouchpadToggle (269025193), utf8: ''
[14: wl_keyboard] key: serial: 126016; time: 225412042; key: 199; state: 0 (released)
sym: XF86TouchpadToggle (269025193), utf8: ''
Here my laptop's Fn+F9
maps to XF86TouchpadToggle
which I have bound as:
bindsym XF86TouchpadToggle input type:touchpad events toggle enabled disabled
Also posted this on Reddit, but doing so as well here for visibility, and also because I like Lemmy and want to see more activity here! :D Hey there. I'm new to sway, and so far things have been working very well for me. But I can't seem to find exactly how to set a keyboard binding that modifies an input. I know how to set up my inputs and custom bindings. But can't figure out how to put the two together. Anyone have some advice on how to remap my Fn+F1 binding to toggle the touchpad?