Problem with keyboard shortcuts

Ideas, enhancements, feature requests and development related discussion.

Problem with keyboard shortcuts

Postby sascha » Mon Mar 27, 2006 9:52 pm

I've changed the code that handles keyboard shortcuts to use Input- and ActionMaps (as suggested by the documentation). Unforunately it doesn't work:

Some of the key-shortcuts are alphanumeric keys - the problem is that when a JTextField somewhere in JPatch (e.g. in the tree, the textfield for changing a model's name) has focus, it does not correctly consume all KeyEvents: It does for example consume cursor left/right keys, but not the alphanumeric keys.
If an action bound to the "a" key, this action is triggered also when a JTextField has focus and the user presses "a" when typing in text.

Here's a link to a very short test-application (source) that shows the problem:
http://jpatch.com/temp/FocusTest.java

Any ideas?
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Return to Development

Who is online

Users browsing this forum: No registered users and 2 guests

cron