Results 1 to 4 of 4

Thread: How to pass key event to linux OS??

  1. #1
    Join Date
    Mar 2015
    Posts
    6
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Lightbulb How to pass key event to linux OS??

    Hi,
    I m trying to develop virtualkeyboard in Linux to enter texts in the current text editor. In windows, for sending the keycode to OS there is API called sendInput().
    How to pass the keycode of the key pressed to the Linux OS ?

    Thanks in advance.
    Regards,
    Jaga.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How to pass key event to linux OS??

    XSendEvent, at least for X11 systems.
    And an Example

  3. #3
    Join Date
    Mar 2015
    Posts
    6
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to pass key event to linux OS??

    Thanks for your reply Chris.

    This method is OK for me right now.

    Regards,
    Jaga

  4. #4
    Join Date
    Mar 2015
    Posts
    6
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Question Re: How to pass key event to linux OS??

    Hi all,

    XSendEvent is not working for unicode characters like Ä,ä,Ö,ö,Ü,ü etc and also both the character 'A' and 'a' is printed as 'a' when the modifier flag is 0 or printed as 'A' when the modifier flag is 1 irrespective of the keycode passed , how to set the modifier flag in XKeyEvent structure depending on the keycode.

    Thanks in Advance:-)

    Regards,
    Jaga.

Similar Threads

  1. Pass event (QWheelEvent) to a specific widget
    By stefanadelbert in forum Qt Programming
    Replies: 2
    Last Post: 5th May 2021, 04:10
  2. To pass a value as response to linux command using QT
    By chillin in forum Qt Programming
    Replies: 7
    Last Post: 3rd March 2014, 15:42
  3. Replies: 2
    Last Post: 24th February 2014, 09:47
  4. Best way to pass data between Windows and Linux
    By deepakn in forum General Programming
    Replies: 1
    Last Post: 28th December 2011, 13:40
  5. pass mouse event information to another widget
    By Rooster in forum Qt Programming
    Replies: 5
    Last Post: 12th July 2008, 05:23

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.