This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Custom keyboard layout options and shortcuts

Tags: None
(comma "," separated)
allirion
Registered Member
Posts
3
Karma
0
On my laptop running archlinux and plasma, I have set up the following shortcuts (in Settings > Shortcuts > Custom Shortcuts) :
  • Alt+E -> run Eclipse
  • Alt+T -> run Thunderbird
  • ...

The shortcuts work fine.

However, if I select "Swap Left Alt with Left Ctrl" advanced option the shortcuts do not work, even if the keys seem correctly swapped (I can use Alt+f as Ctrl+f for example). In the settings interface I can use the "Ctrl" key as alt to set up the shortcut, but the pressing "Ctrl" (mapped to Alt) + E, does nothing. Actually, the swap works fine for everything except the custom shortcuts.

I tried to change it to change the xkb_symbols in /usr/share/X11/xkb/symbols/ctrl:
Code: Select all
xkb_symbols "swap_lalt_lctl" {
    replace key <LALT> { [ Control_L, Control_L ] };
    replace key <LCTL> { [ Alt_L, Meta_L ] };
    modifier_map Mod1    { <LCTL> };
    modifier_map Control { <LALT> };
};

to
Code: Select all
xkb_symbols "swap_lalt_lctl" {
    replace key <LALT> { [ Control_L ] };
    replace key <LCTL> { [ Alt_L ] };
    modifier_map Mod1    { <LCTL> };
    modifier_map Control { <LALT> };
};

And that resulted in the shortcut working, but then all the Ctrl+... shortcuts would fail (no Ctrl+s, Ctrl+f etc.)

I managed to make it work but my changes got lost during a recent update (2 or 3 weeks ago), and I don't know if the problem comes the xkb_symbols or from kwin not managing the shortcut properly.
allirion
Registered Member
Posts
3
Karma
0
I made some progress. My goal was ultimately to map Capslock -> Alt and Left Alt -> Left Control.

For some reason when mapping Capslock to Left Alt and Left Alt to Left Control, the shortcuts would not work. But by mapping Caplock to Right Alt and Left Alt to Left Control, the shortcuts work.

Code: Select all
xkb_symbols "ctrl_modifier" {
    key <CAPS> { [ Alt_R ] };
    key <LALT> { [ Control_L, Control_L ] };
    modifier_map Control { <LALT> };
};


So, I guess my problem is solved, but I still think there is something wrong with the way left alt is handled in the shortcuts.


Bookmarks



Who is online

Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]