DreymaR/BigBagKbdTrixXKB

Problems with Super+letter shortcuts

Opened this issue · 4 comments

Host OS: Arch Linux
VirtualBox Version: 6.1.30 r148432
Steps to reproduce:
Install Xubuntu 21.10 in a VirtualBox VM
Install git, then clone https://github.com/DreymaR/BigBagKbdTrixXKB.git
Install big bag using bash install-dreymar-xmod.sh -o "4caw us us"
Reboot VM
Set keyboard layout with bash setxkb.sh -a "4caw us us"
Try shortcuts involving Super+[Tab, D, E, F, L, etc]

Recorded a video in my VM for demonstration, with python3-pip and python3-xlib additionally installed so I could install key-mon to show keypresses. When I used Xubuntu 21.10 on bare metal with big bag installed like this, Super+L behaved like it did in this vid, but I didn't test the other shortcuts.

demonstration.mp4

Really not sure what's going on there. DId or did you not test other Super shortcuts though? And have you tried the BigBag on your Arch host OS too, or is it only in the VM?

Could you please describe what's happening, as I don't quite follow the video.

I installed the big bag on my Arch host (XFCE desktop environment) the exact same as I did in the vm, but I ran setxkb.sh without -a so I could test the shortcuts while focused on a terminal window before activating it, to make sure the shortcut's problems weren't also mirrored in qwerty. All the shortcuts below were made in xfce4-keyboard-settings ("Keyboard" app) or, if mentioned otherwise, xfwm4-settings ("Window Manager" app) I wrote the results below:

Shortcuts that don't work at first and just type the letter in the terminal (Except Super+Alt+b)(Ex: Super+L will just type L; see 1:02 in vid), but work correctly after changing the shortcut to something else and reverting (Ex: Going into xfce4-keyboard-settings, changing Super+L to Super+/, then back to Super+L (This "fix" goes away after logging out and must be done on every login)):
Super+b
Super+r
Super+c
Super+Alt+b (doesn't type "b', instead functions like Alt+b)
Shortcuts that do nothing until after changing the shortcut to something else and reverting (again, must be done on every login):
Ctrl+Alt+F
Shortcuts that make the terminal cursor transparent, which usually indicates the shortcut will go through (to see what I mean by transparent, see 0:12 and 0:47 in the video where it changes from a solid white rectangle to a thin white outline after the super commands (shown by key-mon on the bottom right)), but nothing happens, even after changing the shortcut to something else and reverting:
Super+f
Super+d
(The above 2 shortcuts were set in xfwm4-settings (Same functions as in the vid; Super+f toggles window maximization, Super+D shows desktop), unlike all the other shortcuts, which were for opening applications. Not sure if that has anything to do with it.)
Shortcuts that worked correctly on login:
Super+a
Super+e
Super+p
Super+w
Super+\
Ctrl+Alt+T
Window manager (xfwm4-settings) shortcuts:
Super+1 (Workspace 1)
Super+2 (Workspace 2)
Super+3 (Workspace 3)
Super+4 (Workspace 4)
Super+Tab (Switch window for same application)
Super+Up (Tile window to the top)
Super+Down (Tile window to the bottom)
Super+Left (Tile window to the left)
Super+Right (Tile window to the right)
Super+g (Hide window)
Super+Home (Tile window to the top-left)
Super+Pgup (Tile window to the top-right)
Super+End (Tile window to the bottom-left)
Super+Pgdn (Tile window to the bottom-right)

Besides shortcuts, there's problems I had with Extend+Q. It didn't close nomacs (nomacs has an option to bind esc to this. Pressing the real esc key does close it), and Extend+Q doesn't close popup windows/menus in Anki (installed via anki-bin), Krita, or Kdenlive, while esc is able to. In GIMP, neovim, Notepad++ (Wine) and elsewhere it does function like esc.

I found a "fix". I set the layout persistently by plugging in the options for the setxkbmap command into localectl set-x11-keymap, which looks like this for 4cw us us: sudo localectl --no-convert set-x11-keymap "us(cmk_ed_us)" "pc104angle-z" "" "misc:extend,lv5:caps_switch_lock,grp:shifts_toggle,compose:menu,misc:cmk_curl_dh" (the "" is because in set-x11-keymap the options have to be set in a specific order, so it prevents setting a variant since the setxkbmap command doesn't. The Xorg Arch Wiki Article explains it well (and --no-convert, which avoids setting the console font; I recommend adding it to the command in README's TODO)). After doing this, the super shortcuts work, and the system uses the big bag layout everywhere including the login screen. The shortcut problem seems to be related to changing layouts AFTER logging in. I uninstalled big bag by restoring from backup and persistently set the Colemak-DH version built into setxkbmap (curl angle) with localectl --no-convert set-x11-keymap us pc105 colemak_dh caps:swapescape,compose:rwin (prob should've been pc104 since I have an ANSI keyboard), then rebooted. The shortcuts worked in DH, but not in qwerty, which I switched to with setxkbmap -option && setxkbmap -model pc105 -layout us -variant altgr-intl -option caps:swapescape,compose:rwin.

On a tangential note, for setting the console font, which is used in TTYs (and the LUKS password prompt if you have that set up, although for that to change, rebuild the initramfs with mkinitcpio -P after changing the layout), I cloned them from the mod-dh repo, gzip'd each .map, made the dir "colemak-dh" with 755 perms in /usr/share/kbd/keymaps/i386/ then moved them all there (I made a basic script to automate this). Then, following this Arch wiki article I set the keymap using localectl set-keymap --no-convert colemak_dh_ansi_us

Edit: seems like with the persistent configuration, extend doesn't work properly and keys don't repeat when held down. I'll just use the colemak dh built into vanilla xkeyboard-config for now.