1 |
/* Keyboard and mouse input; editor command loop. |
/* Keyboard and mouse input; editor command loop. |
2 |
Copyright (C) 1985,86,87,88,89,93,94,95,96,97,99, 2000, 2001 |
Copyright (C) 1985,86,87,88,89,93,94,95,96,97,99, 2000, 01, 2003 |
3 |
Free Software Foundation, Inc. |
Free Software Foundation, Inc. |
4 |
|
|
5 |
This file is part of GNU Emacs. |
This file is part of GNU Emacs. |
4662 |
case multibyte_char_keystroke: |
case multibyte_char_keystroke: |
4663 |
{ |
{ |
4664 |
Lisp_Object lispy_c; |
Lisp_Object lispy_c; |
4665 |
|
int c = event->code; |
4666 |
|
|
4667 |
XSETFASTINT (lispy_c, event->code); |
/* Add in the other modifier bits. We took care of ctrl_modifier |
4668 |
|
just above, and the shift key was taken care of by the X code, |
4669 |
|
and applied to control characters by make_ctrl_char. */ |
4670 |
|
c |= (event->modifiers |
4671 |
|
& (meta_modifier | alt_modifier |
4672 |
|
| hyper_modifier | super_modifier | ctrl_modifier)); |
4673 |
|
|
4674 |
|
XSETFASTINT (lispy_c, c); |
4675 |
return lispy_c; |
return lispy_c; |
4676 |
} |
} |
4677 |
|
|
4689 |
(sizeof (lispy_accent_keys) |
(sizeof (lispy_accent_keys) |
4690 |
/ sizeof (lispy_accent_keys[0]))); |
/ sizeof (lispy_accent_keys[0]))); |
4691 |
|
|
|
/* Handle system-specific keysyms. */ |
|
|
if (event->code & (1 << 28)) |
|
|
{ |
|
|
/* We need to use an alist rather than a vector as the cache |
|
|
since we can't make a vector long enuf. */ |
|
|
if (NILP (current_kboard->system_key_syms)) |
|
|
current_kboard->system_key_syms = Fcons (Qnil, Qnil); |
|
|
return modify_event_symbol (event->code, |
|
|
event->modifiers, |
|
|
Qfunction_key, |
|
|
current_kboard->Vsystem_key_alist, |
|
|
0, ¤t_kboard->system_key_syms, |
|
|
(unsigned)-1); |
|
|
} |
|
|
|
|
4692 |
#ifdef XK_kana_A |
#ifdef XK_kana_A |
4693 |
if (event->code >= 0x400 && event->code < 0x500) |
if (event->code >= 0x400 && event->code < 0x500) |
4694 |
return modify_event_symbol (event->code - 0x400, |
return modify_event_symbol (event->code - 0x400, |
4708 |
iso_lispy_function_keys, &func_key_syms, |
iso_lispy_function_keys, &func_key_syms, |
4709 |
(sizeof (iso_lispy_function_keys) |
(sizeof (iso_lispy_function_keys) |
4710 |
/ sizeof (iso_lispy_function_keys[0]))); |
/ sizeof (iso_lispy_function_keys[0]))); |
|
else |
|
4711 |
#endif |
#endif |
4712 |
return modify_event_symbol (event->code - FUNCTION_KEY_OFFSET, |
|
4713 |
event->modifiers, |
/* Handle system-specific or unknown keysyms. */ |
4714 |
Qfunction_key, Qnil, |
if (event->code & (1 << 28) |
4715 |
lispy_function_keys, &func_key_syms, |
|| event->code - FUNCTION_KEY_OFFSET < 0 |
4716 |
(sizeof (lispy_function_keys) |
|| (event->code - FUNCTION_KEY_OFFSET |
4717 |
/ sizeof (lispy_function_keys[0]))); |
>= sizeof lispy_function_keys / sizeof *lispy_function_keys) |
4718 |
|
|| !lispy_function_keys[event->code - FUNCTION_KEY_OFFSET]) |
4719 |
|
{ |
4720 |
|
/* We need to use an alist rather than a vector as the cache |
4721 |
|
since we can't make a vector long enuf. */ |
4722 |
|
if (NILP (current_kboard->system_key_syms)) |
4723 |
|
current_kboard->system_key_syms = Fcons (Qnil, Qnil); |
4724 |
|
return modify_event_symbol (event->code, |
4725 |
|
event->modifiers, |
4726 |
|
Qfunction_key, |
4727 |
|
current_kboard->Vsystem_key_alist, |
4728 |
|
0, ¤t_kboard->system_key_syms, |
4729 |
|
(unsigned) -1); |
4730 |
|
} |
4731 |
|
|
4732 |
|
return modify_event_symbol (event->code - FUNCTION_KEY_OFFSET, |
4733 |
|
event->modifiers, |
4734 |
|
Qfunction_key, Qnil, |
4735 |
|
lispy_function_keys, &func_key_syms, |
4736 |
|
(sizeof (lispy_function_keys) |
4737 |
|
/ sizeof (lispy_function_keys[0]))); |
4738 |
|
|
4739 |
#ifdef HAVE_MOUSE |
#ifdef HAVE_MOUSE |
4740 |
/* A mouse click. Figure out where it is, decide whether it's |
/* A mouse click. Figure out where it is, decide whether it's |