Hi guys, @Albert, this is following up a point you raised earlier.
The arrow keys (Up, Down, Left and Right) have stopped working in my application some time between KDE 4.6.0 and KDE 4.9.1 (as tested on an old Linux laptop I have). Maybe there has been some change in KDE or Qt that has affected this and I am wondering if anyone can shed any light on the problem or can tell me what code I should use to receive and recognise those keystrokes in my app again. The app is the game KGoldrunner. It uses arrow keys as Default keys to control movement, in keyboard mode, for actions "move_up", etc., with the IJKL keys being Alternate keys. The IJKL keys work but the arrow keys do not. Here it gets tricky. Originally, in KGoldrunner, if you pressed a move-key, movement would start and then continue indefinitely until you pressed another key or hit a barrier. This was easily implemented using KAction and keyboard shortcuts. A few years back, someone requested another option: to continue moving while the key is held down and stop when it is released. To implement this, I decided to use keyPressEvent() and keyReleaseEvent() and receive the movement keys in my own code. At the same time, I assigned the keys as shortcuts to KAction "move_up", etc. but left the "move_*" actions disabled. This was a trick, whereby the user could use Settings->Configure Shortcuts to assign other keys to the "move_*" actions and I could search using KAction::shortcuts().contains(keystroke), where keystroke is a QKeySequence obtained from QKeyEvent * event, to identify the keystroke and required action. Unfortunately, when I press an arrow key, I now get NO keyPressEvent() and a keyReleaseEvent() that yields (using QKeySequence.toString()), a two character sequence that looks like a "t" and a Christmas stocking. Whatever this keystroke is, it is not recognised and anyway it is too late, because there has been no keyPressEvent(). Any ideas? Best regards, Ian W. >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
