Mercurial > emacs
comparison src/w32fns.c @ 87301:1d6e3255f024
Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-956
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sun, 16 Dec 2007 04:31:49 +0000 |
parents | d57729b69f59 fb6105cb466b |
children | cdd30283527d 2fcaae6177a5 |
comparison
equal
deleted
inserted
replaced
87300:b968c7f9a8b4 | 87301:1d6e3255f024 |
---|---|
2955 dpyinfo->faked_key = 0; | 2955 dpyinfo->faked_key = 0; |
2956 /* Make sure TranslateMessage sees them though (as long as | 2956 /* Make sure TranslateMessage sees them though (as long as |
2957 they don't produce WM_CHAR messages). This ensures that | 2957 they don't produce WM_CHAR messages). This ensures that |
2958 indicator lights are toggled promptly on Windows 9x, for | 2958 indicator lights are toggled promptly on Windows 9x, for |
2959 example. */ | 2959 example. */ |
2960 if (lispy_function_keys[wParam] != 0) | 2960 if (wParam < 256 && lispy_function_keys[wParam]) |
2961 { | 2961 { |
2962 windows_translate = 1; | 2962 windows_translate = 1; |
2963 goto translate; | 2963 goto translate; |
2964 } | 2964 } |
2965 return 0; | 2965 return 0; |
3077 if (NILP (Vw32_enable_num_lock) && modifier_set (VK_CONTROL)) | 3077 if (NILP (Vw32_enable_num_lock) && modifier_set (VK_CONTROL)) |
3078 wParam = VK_NUMLOCK; | 3078 wParam = VK_NUMLOCK; |
3079 break; | 3079 break; |
3080 default: | 3080 default: |
3081 /* If not defined as a function key, change it to a WM_CHAR message. */ | 3081 /* If not defined as a function key, change it to a WM_CHAR message. */ |
3082 if (lispy_function_keys[wParam] == 0) | 3082 if (wParam > 255 || !lispy_function_keys[wParam]) |
3083 { | 3083 { |
3084 DWORD modifiers = construct_console_modifiers (); | 3084 DWORD modifiers = construct_console_modifiers (); |
3085 | 3085 |
3086 if (!NILP (Vw32_recognize_altgr) | 3086 if (!NILP (Vw32_recognize_altgr) |
3087 && modifier_set (VK_LCONTROL) && modifier_set (VK_RMENU)) | 3087 && modifier_set (VK_LCONTROL) && modifier_set (VK_RMENU)) |
8157 lookup_vk_code (char *key) | 8157 lookup_vk_code (char *key) |
8158 { | 8158 { |
8159 int i; | 8159 int i; |
8160 | 8160 |
8161 for (i = 0; i < 256; i++) | 8161 for (i = 0; i < 256; i++) |
8162 if (lispy_function_keys[i] != 0 | 8162 if (lispy_function_keys[i] |
8163 && strcmp (lispy_function_keys[i], key) == 0) | 8163 && strcmp (lispy_function_keys[i], key) == 0) |
8164 return i; | 8164 return i; |
8165 | 8165 |
8166 return -1; | 8166 return -1; |
8167 } | 8167 } |
8335 CHECK_NUMBER (hotkeyid); | 8335 CHECK_NUMBER (hotkeyid); |
8336 | 8336 |
8337 vk_code = HOTKEY_VK_CODE (hotkeyid); | 8337 vk_code = HOTKEY_VK_CODE (hotkeyid); |
8338 w32_modifiers = HOTKEY_MODIFIERS (hotkeyid); | 8338 w32_modifiers = HOTKEY_MODIFIERS (hotkeyid); |
8339 | 8339 |
8340 if (lispy_function_keys[vk_code]) | 8340 if (vk_code < 256 && lispy_function_keys[vk_code]) |
8341 key = intern (lispy_function_keys[vk_code]); | 8341 key = intern (lispy_function_keys[vk_code]); |
8342 else | 8342 else |
8343 key = make_number (vk_code); | 8343 key = make_number (vk_code); |
8344 | 8344 |
8345 key = Fcons (key, Qnil); | 8345 key = Fcons (key, Qnil); |