[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/xterm.c
From: |
Kai Großjohann |
Subject: |
[Emacs-diffs] Changes to emacs/src/xterm.c |
Date: |
Fri, 15 Feb 2002 04:36:06 -0500 |
Index: emacs/src/xterm.c
diff -c emacs/src/xterm.c:1.703 emacs/src/xterm.c:1.704
*** emacs/src/xterm.c:1.703 Sun Jan 27 11:43:36 2002
--- emacs/src/xterm.c Fri Feb 15 04:36:05 2002
***************
*** 381,386 ****
--- 381,391 ----
extern int extra_keyboard_modifiers;
+ /* The keysyms to use for the various modifiers. */
+
+ Lisp_Object Vx_alt_keysym, Vx_hyper_keysym, Vx_meta_keysym, Vx_super_keysym;
+ static Lisp_Object Qalt, Qhyper, Qmeta, Qsuper, Qmodifier_value;
+
static Lisp_Object Qvendor_specific_keysyms;
extern XrmDatabase x_load_resources P_ ((Display *, char *, char *, char *));
***************
*** 6422,6433 ****
struct x_display_info *dpyinfo;
unsigned int state;
{
return ( ((state & (ShiftMask | dpyinfo->shift_lock_mask)) ?
shift_modifier : 0)
! | ((state & ControlMask) ? ctrl_modifier : 0)
! | ((state & dpyinfo->meta_mod_mask) ? meta_modifier : 0)
! | ((state & dpyinfo->alt_mod_mask) ? alt_modifier : 0)
! | ((state & dpyinfo->super_mod_mask) ? super_modifier : 0)
! | ((state & dpyinfo->hyper_mod_mask) ? hyper_modifier : 0));
}
static unsigned int
--- 6427,6454 ----
struct x_display_info *dpyinfo;
unsigned int state;
{
+ EMACS_UINT mod_meta = meta_modifier;
+ EMACS_UINT mod_alt = alt_modifier;
+ EMACS_UINT mod_hyper = hyper_modifier;
+ EMACS_UINT mod_super = super_modifier;
+ Lisp_Object tem;
+
+ tem = Fget (Vx_alt_keysym, Qmodifier_value);
+ if (! EQ (tem, Qnil)) mod_alt = XUINT (tem);
+ tem = Fget (Vx_meta_keysym, Qmodifier_value);
+ if (! EQ (tem, Qnil)) mod_meta = XUINT (tem);
+ tem = Fget (Vx_hyper_keysym, Qmodifier_value);
+ if (! EQ (tem, Qnil)) mod_hyper = XUINT (tem);
+ tem = Fget (Vx_super_keysym, Qmodifier_value);
+ if (! EQ (tem, Qnil)) mod_super = XUINT (tem);
+
+
return ( ((state & (ShiftMask | dpyinfo->shift_lock_mask)) ?
shift_modifier : 0)
! | ((state & ControlMask) ? ctrl_modifier : 0)
! | ((state & dpyinfo->meta_mod_mask) ? mod_meta
: 0)
! | ((state & dpyinfo->alt_mod_mask) ? mod_alt
: 0)
! | ((state & dpyinfo->super_mod_mask) ? mod_super : 0)
! | ((state & dpyinfo->hyper_mod_mask) ? mod_hyper : 0));
}
static unsigned int
***************
*** 6435,6446 ****
struct x_display_info *dpyinfo;
unsigned int state;
{
! return ( ((state & alt_modifier) ? dpyinfo->alt_mod_mask : 0)
! | ((state & super_modifier) ? dpyinfo->super_mod_mask : 0)
! | ((state & hyper_modifier) ? dpyinfo->hyper_mod_mask : 0)
! | ((state & shift_modifier) ? ShiftMask : 0)
! | ((state & ctrl_modifier) ? ControlMask : 0)
! | ((state & meta_modifier) ? dpyinfo->meta_mod_mask : 0));
}
/* Convert a keysym to its name. */
--- 6456,6484 ----
struct x_display_info *dpyinfo;
unsigned int state;
{
! EMACS_UINT mod_meta = meta_modifier;
! EMACS_UINT mod_alt = alt_modifier;
! EMACS_UINT mod_hyper = hyper_modifier;
! EMACS_UINT mod_super = super_modifier;
!
! Lisp_Object tem;
!
! tem = Fget (Vx_alt_keysym, Qmodifier_value);
! if (! EQ (tem, Qnil)) mod_alt = XUINT (tem);
! tem = Fget (Vx_meta_keysym, Qmodifier_value);
! if (! EQ (tem, Qnil)) mod_meta = XUINT (tem);
! tem = Fget (Vx_hyper_keysym, Qmodifier_value);
! if (! EQ (tem, Qnil)) mod_hyper = XUINT (tem);
! tem = Fget (Vx_super_keysym, Qmodifier_value);
! if (! EQ (tem, Qnil)) mod_super = XUINT (tem);
!
!
! return ( ((state & mod_alt) ? dpyinfo->alt_mod_mask : 0)
! | ((state & mod_super) ? dpyinfo->super_mod_mask : 0)
! | ((state & mod_hyper) ? dpyinfo->hyper_mod_mask : 0)
! | ((state & shift_modifier) ? ShiftMask : 0)
! | ((state & ctrl_modifier) ? ControlMask : 0)
! | ((state & mod_meta) ? dpyinfo->meta_mod_mask : 0));
}
/* Convert a keysym to its name. */
***************
*** 15035,15040 ****
--- 15073,15117 ----
staticpro (&last_mouse_motion_frame);
last_mouse_motion_frame = Qnil;
+
+ Qmodifier_value = intern ("modifier-value");
+ Qalt = intern ("alt");
+ Fput (Qalt, Qmodifier_value, make_number (alt_modifier));
+ Qhyper = intern ("hyper");
+ Fput (Qhyper, Qmodifier_value, make_number (hyper_modifier));
+ Qmeta = intern ("meta");
+ Fput (Qmeta, Qmodifier_value, make_number (meta_modifier));
+ Qsuper = intern ("super");
+ Fput (Qsuper, Qmodifier_value, make_number (super_modifier));
+
+ DEFVAR_LISP ("x-alt-keysym", &Vx_alt_keysym,
+ doc: /* Which keys Emacs uses for the alt modifier.
+ This should be one of the symbols `alt', `hyper', `meta', `super'.
+ For example, `alt' means use the Alt_L and Alt_R keysyms. The default
+ is nil, which is the same as `alt'. */);
+ Vx_alt_keysym = Qnil;
+
+ DEFVAR_LISP ("x-hyper-keysym", &Vx_hyper_keysym,
+ doc: /* Which keys Emacs uses for the hyper modifier.
+ This should be one of the symbols `alt', `hyper', `meta', `super'.
+ For example, `hyper' means use the Hyper_L and Hyper_R keysyms. The
+ default is nil, which is the same as `hyper'. */);
+ Vx_hyper_keysym = Qnil;
+
+ DEFVAR_LISP ("x-meta-keysym", &Vx_meta_keysym,
+ doc: /* Which keys Emacs uses for the meta modifier.
+ This should be one of the symbols `alt', `hyper', `meta', `super'.
+ For example, `meta' means use the Meta_L and Meta_R keysyms. The
+ default is nil, which is the same as `meta'. */);
+ Vx_meta_keysym = Qnil;
+
+ DEFVAR_LISP ("x-super-keysym", &Vx_super_keysym,
+ doc: /* Which keys Emacs uses for the super modifier.
+ This should be one of the symbols `alt', `hyper', `meta', `super'.
+ For example, `super' means use the Super_L and Super_R keysyms. The
+ default is nil, which is the same as `super'. */);
+ Vx_super_keysym = Qnil;
+
}
#endif /* HAVE_X_WINDOWS */
- [Emacs-diffs] Changes to emacs/src/xterm.c, Kim F. Storm, 2002/02/01
- [Emacs-diffs] Changes to emacs/src/xterm.c,
Kai Großjohann <=
- [Emacs-diffs] Changes to emacs/src/xterm.c, Pavel Janík, 2002/02/16
- [Emacs-diffs] Changes to emacs/src/xterm.c, Kim F. Storm, 2002/02/16
- [Emacs-diffs] Changes to emacs/src/xterm.c, Pavel Janík, 2002/02/23
- [Emacs-diffs] Changes to emacs/src/xterm.c, Pavel Janík, 2002/02/28
- [Emacs-diffs] Changes to emacs/src/xterm.c, Kenichi Handa, 2002/02/28