python dude
python dude

Reputation: 8358

SWT: Convert keycode to string

I'm writing a text widget in Java SWT that displays a user-defined keyboard shortcut, such as CTRL + A. Is there some way to map SWT's internal stateMask-keyCode pairs to a string, or do I have to do this by hand?

Upvotes: 0

Views: 774

Answers (2)

Sameer Gowda
Sameer Gowda

Reputation: 1

org.eclipse.jface.bindings.keys.SWTKeyLookup would help for simple string [Upper Case] to SWT keycode mapping

Upvotes: 0

Prakash G. R.
Prakash G. R.

Reputation: 4892

See org.eclipse.jface.bindings.keys.KeySequenceText and org.eclipse.jface.bindings.keys.KeySequence for a similar usage.

Upvotes: 3

Related Questions