Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Left Alt as Extend #18

Open
not-leader opened this issue May 14, 2021 · 2 comments
Open

Suggestion: Left Alt as Extend #18

not-leader opened this issue May 14, 2021 · 2 comments
Labels
enhancement Make things better question Good one!

Comments

@not-leader
Copy link

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

@DreymaR
Copy link
Owner

DreymaR commented May 17, 2021

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

@DreymaR DreymaR added enhancement Make things better question Good one! labels May 24, 2021
@DreymaR DreymaR reopened this May 24, 2021
@DreymaR
Copy link
Owner

DreymaR commented May 24, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Make things better question Good one!
Projects
None yet
Development

No branches or pull requests

2 participants