Overriden event function and strange Alt+= key behaviour
-
I am handling
QEvent::KeyPress
events in class derived fromQLineEdit
and everything would be good if not one key.
Alt+= is acting something like compose key in my system. I can insert ȩḑçņ characters and to be honest i have no idea why.
This is how it looks insideevent(QEvent* e)
:[ 01:50:17 ]: QKeyEvent(KeyRelease, 100125b, 40000000, ""¸"", false, 2) // for alt+= [ 01:51:18 ]: QKeyEvent(KeyRelease, 100125c, 42000000, ""Ë"", false, 2) // for alt+shift+=
There are no
QEvent::KeyPress
events! Besides of that it is somehow inserting ¸¸¸¸¸or ˛˛˛˛ when i hold these keystrokes. I don't want that. That's nasty.My problem is I really want to handle this keystroke and get
nativeScanCode()
with '='.
Xev is displaying this asKeyPress event, serial 40, synthetic NO, window 0x5800001, root 0x270, subw 0x0, time 16442476, (-857,169), root:(427,799), state 0x90, keycode 21 (keysym 0xfe5b, dead_cedilla), same_screen YES, XLookupString gives 2 bytes: (c2 b8) "¸" XmbLookupString gives 0 bytes: XFilterEvent returns: True
Is this
XFilterEvent
my obstacle here? What can I do? -
Hi,
With which version of Qt are you experiencing this ?
-
IIRC Qt 5.5.0 has a bug handling certain key combination which should be fixed for 5.5.1 If you can, try with this one (you may have to built it by hand though)