Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Overriden event function and strange Alt+= key behaviour

Overriden event function and strange Alt+= key behaviour

Scheduled Pinned Locked Moved General and Desktop
qevent
4 Posts 2 Posters 1.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mkolenda
    wrote on 13 Aug 2015, 23:51 last edited by mkolenda
    #1

    I am handling QEvent::KeyPress events in class derived from QLineEdit 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 inside event(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 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
    

    Is this XFilterEvent my obstacle here? What can I do?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 14 Aug 2015, 21:34 last edited by
      #2

      Hi,

      With which version of Qt are you experiencing this ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      M 1 Reply Last reply 15 Aug 2015, 00:22
      0
      • S SGaist
        14 Aug 2015, 21:34

        Hi,

        With which version of Qt are you experiencing this ?

        M Offline
        M Offline
        mkolenda
        wrote on 15 Aug 2015, 00:22 last edited by
        #3

        @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.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 15 Aug 2015, 19:33 last edited by
          #4

          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)

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          4/4

          15 Aug 2015, 19:33

          • Login

          • Login or register to search.
          4 out of 4
          • First post
            4/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved