Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Overriden event function and strange Alt+= key behaviour
mkolenda last edited by mkolenda
I am handling
QEvent::KeyPressevents in class derived from
QLineEditand 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 inside
[ 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::KeyPressevents! 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
Xev is displaying this as
KeyPress 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
XFilterEventmy obstacle here? What can I do?
With which version of Qt are you experiencing this ?
mkolenda last edited by
@SGaist This is 4.8 but i'm moving code to latest 5 version soon.
It just seems like Qt somehow doesn't handle this event which xev is able to properly detect.
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)