diff options
| author | Steven Tamm | 2002-12-22 21:09:20 +0000 |
|---|---|---|
| committer | Steven Tamm | 2002-12-22 21:09:20 +0000 |
| commit | 402e4f8bd4bd37ba1eb1f3c30b44c0e5e95dcd9d (patch) | |
| tree | c5a89d3280f29c418f9a4ccd4230dbf782c54073 /src | |
| parent | 58e104693b67370abe79eb940e7450575dd386dc (diff) | |
| download | emacs-402e4f8bd4bd37ba1eb1f3c30b44c0e5e95dcd9d.tar.gz emacs-402e4f8bd4bd37ba1eb1f3c30b44c0e5e95dcd9d.zip | |
* macterm.c (XTread_socket): Call KeyTranslate for control and
meta to deal correctly shifted non-alpha characters, like C-S-5
being treated like C-%. Does not look for shift key to deal
with masking off control-key with mac-reverse-ctrl-meta.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/macterm.c | 21 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 6de8602e6f6..54772be0304 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2002-12-22 Steven Tamm <steventamm@mac.com> | ||
| 2 | |||
| 3 | * macterm.c (XTread_socket): Call KeyTranslate for control and | ||
| 4 | meta to deal correctly shifted non-alpha characters, like C-S-5 | ||
| 5 | being treated like C-%. Does not look for shift key to deal | ||
| 6 | with masking off control-key with mac-reverse-ctrl-meta. | ||
| 7 | |||
| 1 | 2002-12-21 Richard M. Stallman <rms@gnu.org> | 8 | 2002-12-21 Richard M. Stallman <rms@gnu.org> |
| 2 | 9 | ||
| 3 | * xmenu.c (popup_get_selection): Now static. New arg DO_TIMERS. | 10 | * xmenu.c (popup_get_selection): Now static. New arg DO_TIMERS. |
diff --git a/src/macterm.c b/src/macterm.c index d2299524362..0e97e6bbb30 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -12931,26 +12931,19 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) | |||
| 12931 | bufp->code = 0xff00 | xkeysym; | 12931 | bufp->code = 0xff00 | xkeysym; |
| 12932 | bufp->kind = NON_ASCII_KEYSTROKE_EVENT; | 12932 | bufp->kind = NON_ASCII_KEYSTROKE_EVENT; |
| 12933 | } | 12933 | } |
| 12934 | else if (!NILP (Vmac_reverse_ctrl_meta) && (er.modifiers & controlKey)) | ||
| 12935 | { | ||
| 12936 | /* This is a special case to deal with converting from | ||
| 12937 | a control character to non-control character */ | ||
| 12938 | int new_modifiers = er.modifiers & ~controlKey; | ||
| 12939 | int new_keycode = keycode | new_modifiers; | ||
| 12940 | Ptr kchr_ptr = (Ptr) GetScriptManagerVariable (smKCHRCache); | ||
| 12941 | unsigned long some_state = 0; | ||
| 12942 | bufp->code = KeyTranslate (kchr_ptr, new_keycode, &some_state) & 0xff; | ||
| 12943 | bufp->kind = ASCII_KEYSTROKE_EVENT; | ||
| 12944 | } | ||
| 12945 | else | 12934 | else |
| 12946 | { | 12935 | { |
| 12947 | if (er.modifiers & macMetaKey) | 12936 | if (er.modifiers & (controlKey | |
| 12937 | (NILP (Vmac_command_key_is_meta) ? optionKey | ||
| 12938 | : cmdKey))) | ||
| 12948 | { | 12939 | { |
| 12949 | /* This code comes from Keyboard Resource, Appendix | 12940 | /* This code comes from Keyboard Resource, Appendix |
| 12950 | C of IM - Text. This is necessary since shift is | 12941 | C of IM - Text. This is necessary since shift is |
| 12951 | ignored in KCHR table translation when option or | 12942 | ignored in KCHR table translation when option or |
| 12952 | command is pressed. */ | 12943 | command is pressed. It also does not translate |
| 12953 | int new_modifiers = er.modifiers & 0xf600; | 12944 | correctly control-shift chars like C-% so mask off |
| 12945 | shift here also */ | ||
| 12946 | int new_modifiers = er.modifiers & 0xe600; | ||
| 12954 | /* mask off option and command */ | 12947 | /* mask off option and command */ |
| 12955 | int new_keycode = keycode | new_modifiers; | 12948 | int new_keycode = keycode | new_modifiers; |
| 12956 | Ptr kchr_ptr = (Ptr) GetScriptManagerVariable (smKCHRCache); | 12949 | Ptr kchr_ptr = (Ptr) GetScriptManagerVariable (smKCHRCache); |