aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGeoff Voelker1996-05-03 18:35:06 +0000
committerGeoff Voelker1996-05-03 18:35:06 +0000
commit407c17456ac0f7bfcccd50c8a68e59dee111796f (patch)
tree1dadf74af21fde9331caa14e359436f495e933ec /src
parent8dfdd41fa860572ab6dcfe76b0dec2fadea3cd6a (diff)
downloademacs-407c17456ac0f7bfcccd50c8a68e59dee111796f.tar.gz
emacs-407c17456ac0f7bfcccd50c8a68e59dee111796f.zip
(win32_kdb_patch_key): Initialize isdead.
(key_event) [HAVE_NTGUI]: Use Windows key code.
Diffstat (limited to 'src')
-rw-r--r--src/w32inevt.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/w32inevt.c b/src/w32inevt.c
index 80e8cdf21c4..f7565affb94 100644
--- a/src/w32inevt.c
+++ b/src/w32inevt.c
@@ -92,7 +92,7 @@ get_frame (void)
92 92
93/* Translate console modifiers to emacs modifiers. 93/* Translate console modifiers to emacs modifiers.
94 German keyboard support (Kai Morgan Zeise 2/18/95). */ 94 German keyboard support (Kai Morgan Zeise 2/18/95). */
95int 95int
96win32_kbd_mods_to_emacs (DWORD mods) 96win32_kbd_mods_to_emacs (DWORD mods)
97{ 97{
98 int retval = 0; 98 int retval = 0;
@@ -128,7 +128,7 @@ win32_kbd_patch_key (KEY_EVENT_RECORD *event)
128 unsigned int mods = event->dwControlKeyState; 128 unsigned int mods = event->dwControlKeyState;
129 BYTE keystate[256]; 129 BYTE keystate[256];
130 static BYTE ansi_code[4]; 130 static BYTE ansi_code[4];
131 static int isdead; 131 static int isdead = 0;
132 132
133 if (isdead == 2) 133 if (isdead == 2)
134 { 134 {
@@ -159,7 +159,7 @@ win32_kbd_patch_key (KEY_EVENT_RECORD *event)
159 event->uChar.AsciiChar = ansi_code[0]; 159 event->uChar.AsciiChar = ansi_code[0];
160 return isdead; 160 return isdead;
161} 161}
162 162
163/* Map virtual key codes into: 163/* Map virtual key codes into:
164 -1 - Ignore this key 164 -1 - Ignore this key
165 -2 - ASCII char 165 -2 - ASCII char
@@ -292,7 +292,7 @@ key_event (KEY_EVENT_RECORD *event, struct input_event *emacs_ev)
292 static BOOL map_virt_key_init_done; 292 static BOOL map_virt_key_init_done;
293 293
294 /* Skip key-up events. */ 294 /* Skip key-up events. */
295 if (event->bKeyDown == FALSE) 295 if (!event->bKeyDown)
296 return 0; 296 return 0;
297 297
298 if (event->wVirtualKeyCode > 0xff) 298 if (event->wVirtualKeyCode > 0xff)
@@ -318,7 +318,7 @@ key_event (KEY_EVENT_RECORD *event, struct input_event *emacs_ev)
318 the queue. If they're backing up then we don't generally want 318 the queue. If they're backing up then we don't generally want
319 to honor them later since that leads to significant slop in 319 to honor them later since that leads to significant slop in
320 cursor motion when the system is under heavy load. */ 320 cursor motion when the system is under heavy load. */
321 321
322 map = map_virt_key[event->wVirtualKeyCode]; 322 map = map_virt_key[event->wVirtualKeyCode];
323 if (map == -1) 323 if (map == -1)
324 { 324 {
@@ -354,14 +354,17 @@ key_event (KEY_EVENT_RECORD *event, struct input_event *emacs_ev)
354 { 354 {
355 /* non-ASCII */ 355 /* non-ASCII */
356 emacs_ev->kind = non_ascii_keystroke; 356 emacs_ev->kind = non_ascii_keystroke;
357#ifdef HAVE_NTGUI
358 /* use Windows keysym map */
359 XSETINT (emacs_ev->code, event->wVirtualKeyCode);
360#else
357 /* 361 /*
358 * make_lispy_event () now requires non-ascii codes to have 362 * make_lispy_event () now requires non-ascii codes to have
359 * the full X keysym values (2nd byte is 0xff). add it on. 363 * the full X keysym values (2nd byte is 0xff). add it on.
360 */ 364 */
361#ifndef HAVE_NTGUI
362 map |= 0xff00; 365 map |= 0xff00;
363#endif
364 XSETINT (emacs_ev->code, map); 366 XSETINT (emacs_ev->code, map);
367#endif /* HAVE_NTGUI */
365 } 368 }
366/* for Mule 2.2 (Based on Emacs 19.28) */ 369/* for Mule 2.2 (Based on Emacs 19.28) */
367#ifdef MULE 370#ifdef MULE
@@ -388,8 +391,8 @@ win32_mouse_position (FRAME_PTR *f,
388 unsigned long *time) 391 unsigned long *time)
389{ 392{
390 BLOCK_INPUT; 393 BLOCK_INPUT;
391 394
392#ifndef MULE 395#ifndef MULE
393 insist = insist; 396 insist = insist;
394#endif 397#endif
395 398