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. QLineEdit and QTextEdit misread OS X Keystroke events
QtWS25 Last Chance

QLineEdit and QTextEdit misread OS X Keystroke events

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.7k 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.
  • D Offline
    D Offline
    dcortesi
    wrote on last edited by
    #1

    My app uses both QLineEdit and QTextEdit running in Mac OS X 10.6. These widgets mis-read input key events that are generated by "PopChar":http://www.ergonis.com/products/popcharx/ and "Typinator":http://www.ergonis.com/products/typinator/, two popular add-ons from Ergonis Gmbh.

    When I attempt to input a Unicode character using PopChar, or when Typinator attempts to insert the expansion of a keystroke macro, all that appears in the input field is a lowercase letter a.

    (Edit: Qt also ignores keystroke input from the Apple Keyboard Viewer. To test this,

    • open System Preferences
    • select the Language and Text pane
    • at the bottom, set the check box "Show input menu in menu bar"

    Now from the menu bar you can open a Character Viewer that allows you to view and enter all Unicode chars, or a Keyboard Viewer that shows you all the special characters entered with modifier keys. Either method of inserting characters is ignored by Qt (and some other apps) but supported by BBEdit and by official Apple apps such as TextEdit. /edit)

    I queried Ergonis support and this was the reply:

    bq. Both PopChar and Typinator use an event mechanism that was introduced with Mac OS X 10.4. For more information, please see the Quartz Event Services Reference: http://tinyurl.com/77buqql
    Look for the CGEventKeyboardGetUnicodeString function....Both PopChar and Typinator use this technique to transmit characters or entire phrases to the current application. For example, Typinator breaks expansions into 20 character pieces and sends these fragments as separate keyboard events. The key code is irrelevant here, as there is not a single key that represents the character or string.

    There seems to be a problem with Qt's handling of this type of event. Can anyone suggest a workaround?

    1 Reply Last reply
    0

    • Login

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