|Capturing All Key Events in a Text Field [message #429992]
||Thu, 30 July 2009 15:24
Registered: July 2009
I am working on a text field just like the "Binding" field in the "Keys" preferences page in Eclipse. In this text field, I want to display the key combination the user just hit, e.g. "Ctrl+P", "Alt+Shift+6", etc.|
My text field (instance of Text) resides in an ApplicationWindow. What I already have basically works, only I don't want other key listeners to interfere. Escpecially I want to capture
- the tab key and display "Tab", "Shift+Tab", "Ctrl+Tab", etc. How do I temporarily disable control traversal when my text field has the focus?
- Alt+F4. It looks like the ApplicationWindow always closes when I hit Alt+F4 (under Windows). In most cases I'm fine with that, but how do deactivate this behavior?
- accelerators from bound actions. Let's say I have a "Close Window" action in the window's menu that is assigned the accelerator Ctrl+W---how can I tell SWT not to execute the action so I can display "Ctrl+W" in my text field?
I'm really desperate and can't figure this out ...
PS: This forum and this text editor here looks neat.
[Updated on: Thu, 30 July 2009 15:24]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02242 seconds