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. Mac dead keys and QInputMethodEvent
Forum Updated to NodeBB v4.3 + New Features

Mac dead keys and QInputMethodEvent

Scheduled Pinned Locked Moved General and Desktop
qinputmethodevedead keysqwindowqwidgetmac os
2 Posts 2 Posters 1.2k Views 2 Watching
  • 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.
  • W Offline
    W Offline
    woolfman007
    wrote on 9 Sept 2015, 17:45 last edited by
    #1

    Hey there Qt experts ;-)

    I have a rather special question: as far as I understood, dead key composition on the Mac is being done via the QInputMethodEvent. At least that's what I'm seeing in the debugger: if I enter a tilde ('~') for instance, I have to press space afterwards, to make it a distinct character. In that case, no QKeyEvents arrive, but a QInputMethodEvent if I finally press the space bar. It will then contain whatever char or string results from the composition. So far, so good. Only, I want to explicitly use this in a QWindow and not a QWidget. Don't suggest otherwise, I have no choice, I have to use QWindow. Alas, QWindow will not receive QInputMethodEvents. In my tilde case, some QKeyEvents arrive at the QWindow, one of them being typed as Qt::Key_unknown. So my question is: how can I achieve dead key composition on the Mac without using the QWidget system?

    thanks a bunch,
    Wolfgang

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 9 Sept 2015, 20:56 last edited by
      #2

      Hi,

      You could try with an eventFilter and handle QEvent::InputMethod in there

      Hope it helps

      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

      2/2

      9 Sept 2015, 20:56

      • Login

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