Results 1 to 2 of 2

Thread: How to disable auto-repeat?

  1. #1
    Join Date
    Feb 2006
    Posts
    6
    Thanks
    1
    Thanked 4 Times in 1 Post

    Default How to disable auto-repeat?

    Using keyPressEvent and keyReleaseEvent, I would like to disable auto-reapeating of keys.

    The QT docs says this about keyPressEvent and keyReleaseEvent:
    called whenever a key is pressed, and again when a key has been held down long enough for it to auto-repeat.
    But nothing about how to diasble auto-repeating, it is possible? =]

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: How to disable auto-repeat?

    You can programmatically prevent auto-repeat by ignoring the key event when it is an auto-repeat.

    bool QKeyEvent::isAutoRepeat () const

    Returns true if this event comes from an auto-repeating key; returns false if it comes from an initial key press.

    Note that if the event is a multiple-key compressed event that is partly due to auto-repeat, this function could return either true or false indeterminately.

  3. The following user says thank you to jpn for this useful post:

    lumber44 (28th February 2006)

Similar Threads

  1. Keyboard auto repeat
    By akiross in forum Qt Programming
    Replies: 7
    Last Post: 4th March 2007, 16:05
  2. How disable auto spell checking
    By oashton in forum KDE Forum
    Replies: 1
    Last Post: 31st January 2006, 10:51

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.