T.R | Title | User | Personal Name | Date | Lines |
---|
2036.1 | | CRLTRX::jg | Jim Gettys, Cambridge Research Lab | Sun Jan 14 1990 15:01 | 9 |
| You may be trying to do something evil.....
In any case, for DEC keyboards, the keycode happens to be the LK201 scan-code.
So you can get a list from the LK201 spec.
Note that making things keycode dependent is almost always the wrong thing to
do, as your software may not run against other people's servers, or future
DEC keyboards.
- Jim
|
2036.2 | Lemme second that...(KeySym's are the way to go) | GOLLY::MILLER | I need 'Deeper Understanding' | Sun Jan 14 1990 18:14 | 16 |
| If we'd only used KeySym's from the beginning, we'd have a lot less
re-work to do.
Our application's a server extension, and we had access to server header
files. Because it seemed *easy to do* at first, we went with KeyCodes in
our scripting.
Now we've got a nightmarish UI with respect to modifying KeyCode
related info. and we're also inadvertantly locked into the LK201.
We're remedying this shortly.
Regards,
== ken miller ==
DEC/Test Manager Development
|
2036.3 | an easier way??? | TOWNS::RUFFIEUX | | Sun Jan 14 1990 22:27 | 10 |
| The reason I needed the key code is to do the following: ( Maybe there
is an easier way to do it??)
I have a simple text widget. When the user enters text into the
widget and is done, I would like for them to be able to press
<RETURN> and activate a callback. I was going to do this by
monitoring the keycode for a <RETURN> in a value_changed callback.
Once the <RETURN> was sensed, I would capture the data in the
stext. If anyone knows an easier way, please let me know..
|
2036.4 | Default button | FEGPX::SWEENEY | Patrick Sweeney in Hong Kong | Mon Jan 15 1990 09:52 | 7 |
| There's a simple way. Don't know why it isn't emphasized in learning
DECwindows:
For the popup dialog box there's a default button resource. When you
assign an "OK" pushbutton to the value for default button, you will get
an activate callback when the user types return. Alternatively, the
user call press MB1 on the pushbutton and get the same semantics.
|
2036.5 | thanks | TOWNS::RUFFIEUX | | Mon Jan 15 1990 12:47 | 3 |
| re.4
Thanks alot...
|
2036.6 | Just for completeness | DECWIN::FISHER | Burns Fisher 381-1466, ZKO3-4/W23 | Mon Jan 15 1990 21:41 | 9 |
| Of course, if you wanted to find the keycodes, you could do what Xlib
does: Use XGetKeyboardMapping. That gives you the mapping between
keycodes (the "arbitrary numbers") and keysyms, a different set of
numbers defined by the X protocol, which indicates the symbol that is
on the keytop.
Burns
|