Gamepad button as mod key for Sway?

relies heavily on the “mod” key, which is the “Super” key by default so Fn + AltL on the uConsole

I do not know how easy it is to remap things under Wayland, but on the uConsole, I use the volume button for the window manager’s meta key. (escape XF86AudioLowerVolume in ratpoison. I use ratpoison on the DevTerm, too, but I use the Cmd key, which is Super_R. I have the volume up/down buttons mapped to screen brightness, and Fn+< and Fn+> cycle through windows.) One thing you might try is remapping the right Ctrl/Alt keys, depending on whether you need both pairs.

I was wondering if there is a way to use one of the gamepad buttons

There are some dip switches on the back of the keyboard that can be used to send normal keypresses instead of gamepad keypresses, but they’re mapped to letter keys. (I seem to recall the dip switches are actually on the board, but it’s a bit more involved to disassemble than the DevTerm is.)

You could try getting the Arduino devkit to work (if anyone knows a way to rebuild the firmware for the keyboard without going through Arduino’s IDE, please let me know) and that’d enable you to just tweak the appropriate bits in the firmware and reflash. Remapping a single key is not difficult. Have a look at uConsole/Code/uconsole_keyboard at master · clockworkpi/uConsole · GitHub . The bit that handles the presses for the A button is here: uConsole/Code/uconsole_keyboard/keymaps.ino at master · clockworkpi/uConsole · GitHub . It looks like it’s mapped to “j” when the switch is toggled, so if you wanted it to send the same keycode as Cmd/Fn+Alt does, then, per line 670, it looks like you want to use _CMD_KEY.