DreymaR/BigBagKbdTrixXKB

Suggestion: Left Alt as Extend

not-leader opened this issue · 2 comments

When messing around with setxkbmap, I noticed a lack of a Left alt as extend option. It'd be nice to have it though.

Yeah, I guess! Note that there are some options already present in xkb-data:

   lv5                  Key to choose 5th level
  lv5:lsgt_switch_lock Less/Greater chooses 5th level; acts as onetime lock when pressed together with another 5th level chooser
  lv5:ralt_switch_lock Right Alt chooses 5th level; acts as onetime lock when pressed together with another 5th level chooser
  lv5:lwin_switch_lock Left Win chooses 5th level; acts as onetime lock when pressed together with another 5th level chooser
  lv5:rwin_switch_lock Right Win chooses 5th level; acts as onetime lock when pressed together with another 5th level chooser
  lv5:caps_switch_lock Caps Lock chooses 5th level, locks when pressed together with another 5th-level-chooser
  lv5:lctl_switch_lock Left Ctrl chooses 5th level, locks when pressed together with another 5th-level-chooser

You could find any of those entries in the symbols\level5 file like for instance RALT, and hack it to the LALT key if you want to!

// The left (formerly right) Alt key (while pressed) chooses the fifth shift level.
partial modifier_keys
xkb_symbols "ralt_switch" {
  key <LALT> {
    type[Group1]="ONE_LEVEL",
    symbols[Group1] = [ ISO_Level5_Shift ]
  };
  include "level5(modifier_mapping)"
};

Then by choosing the lv5:ralt_switch setxkbmap option, you'd actually get the LALT switch. Dirty but effective.

The rules/evdev.lst file in my repo
The symbols/level5 file in my repo

I think it's beneficial to have this issue open so people can see the solution more easily. I'll also try to remember to add it to my files eventually.