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

is there alternative keyboard subsystem? Fixing shortcuts.

Tags: None
(comma "," separated)
martinmucha
Registered Member
Posts
10
Karma
0
I'm a devel, I need to use shortcuts a lot. I don't know what kde does where and how with keyboard, but there is something wrong. Stuff which works on multiple different desktop variants, seems to have problem here.

I will describe 2 usecases, and my question is, if it is possible to somehow to switch to different subsystem of how kde treats keyboard input, which might behave better. I don't need to use two-part shortcuts (actually how to disable that?), I need correct functionality.

usecase 1: If I use default us layout and launch xev, pressing alt produces alt and pressing enter produces enter. However, only in KDE, if I launch idea and try to press alt-enter combo, nothing happens. If I try to re-assign this combo, java process detects meta+alt+enter. META WASN'T PRESSED though.

usecase 2:

my keyboard layout uses:
include "level3(ralt_alt)" //right alt is right alt actually
include "level3(win_switch)" //both window key is level3 key
include "level3(menu_switch)" //menu key is also level3 key

and this key definition:

key <AB03> { [ c, C, Escape, NoSymbol ] };

and just this thing creates surprising stuff. On isolevel3 on char c, there is escape defined. It works, but if I press ctrl-c nothing happens! Why? No idea, but there is global shortcut ctrl-escape which causes conflict. If I remove ctrl-escape global shortcut, ctrl-c will work again. BUT! I didn't (for love of god) press ctrl-escape, I pressed ctrl-c (and that xev dude saw that, he would confirm), so I really have no idea, why ctrl-escape global shortcut kicks in. Another example. Lets say, that I defined Esc as global shortcut, for say system shutdown shortcut when leaving office. If I press c now, nothing happens! Why? Again, because level3-c could produce escape if pressed(which it wasn't), so letter c 'cannot' work, for some reason. Think this is 'ritial' issue for me!
koffeinfriedhof
Registered Member
Posts
608
Karma
4
OS
Hi!

What keyboard subsystem do you use currently? An alternative would be switching to ibus. Thats what GNOME uses as default. Or deactivate it if it is currently in use. As I do not know how ibus internally works, I cannot really help out there.

About the Meta-key. In the linux kernel there is no meta, super, hyper key. Meta means Alt, or more precise a "capsshift". In X11 Meta, Super and Hyper are three different keys (like they were present on the old Space Cadet Keyboard or some lisp machines). In Qt Meta and Super are different keys. Hyper is not defined, but the first two are somewhere mapped to the same key. In GNOME, Meta is Super. So if anything calls a key META, look up what it really is. Really annoying.

About the ctrl-c-thing: This seems to be the correct behaviour as you press ctrl-c which triggers your layout/xmodmap/whatever to send ESC. The control key itself is recognized as pressed down and not released yet, which makes it appear as control-c. The third level in a xkb-layout can be triggered using AltGr. The control key has a special behaviour, so you do send normal SIGINT on ctrl-c instead of the expected escape-sequence which may work but is not the same.

If programming a keyboard input system you have to possibilities. You can react to a press down or on a release. The default is press down with additional time-management to get repeat state and so on, but in some graphical environments like Qt/QML you can use the release-event as this is much more intuitive for touchscreens. You probably know this from your mobile. Press, Press-and-hold, fire action on release what e.g. virtual keyboards use. So it depends on how the application implements it.

But back to work:
Depending on how your modifier keys are bound (see `xmodmap` without args) you have the following combinations to get to all 8 Levels:
No modifier | Shift | AltGr | Shift+AltGr | L5 | L5+Shift | L5+AltGr | L5+Shift+AltGr |
The "L5" is a ISO_LEVEL5_SHIFT which normally isn't defined as most layouts are four level only.


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell