I would like to use the Sway window manager in my uConsole but it relies heavily on the “mod” key, which is the “Super” key by default so Fn + AltL on the uConsole. That’s too cumbersome to use effectively.
I was wondering if there is a way to use one of the gamepad buttons (A for example) for this since I’m not using those for anything right now. But I’m stuck trying to configure that since they aren’t really keyboard keys.
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.
I relied on this post to get sway working with the uConsole mod keys
The ‘sticky’ mode in particular is necessary to avoid other Fn keys.
Unfortunately, I’ve been unable to find any mapping for the gamepad buttons. wev doesn’t even register them.
It seems that AntiMicroX is the way forward here. After compiling it myself (no ARM binaries provided) I was able to remap the Y and X buttons to PageUp and PageDown respectively. This makes scrolling in webpages much easier.
Unfortunately I was not yet able to remap the Sway modifier key (CMD, Fn+Alt) . There are some bugs in AntiMicroX still that might be related to this but I’m a bit at a dead end after two evenings of trying. Maybe someone else on this board can offer another insight.