Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

does emacs know (xev-like) when a modifier key is pressed?

12 views
Skip to first unread message

Joe Corneli

unread,
Sep 13, 2012, 10:00:36 AM9/13/12
to help-gn...@gnu.org
I'd like to create a little mode-line "lighter" that will show which
combination of modifier keys is pressed. (My keyboard has a sticky
key problem, so this would help me diagnose how to unjam the keys.)
Does Emacs know which modifiers are "on" at a given moment?

Pascal J. Bourguignon

unread,
Sep 13, 2012, 10:43:05 AM9/13/12
to
M-x apropos RET modifier RET


--
__Pascal Bourguignon__ http://www.informatimago.com/
A bad day in () is better than a good day in {}.

Jason Rumney

unread,
Sep 13, 2012, 10:49:27 AM9/13/12
to help-gn...@gnu.org
On Thursday, 13 September 2012 22:00:53 UTC+8, Joe Corneli wrote:

> Does Emacs know which modifiers are "on" at a given moment?

No. Certainly not at the lisp level. On some platforms that do not support all modifiers being applied to any key, the C code has knowledge for some modifiers, but it isn't exposed outside of the keyboard handling code (see mod_key_state in w32inevt.c for example)

Jason Rumney

unread,
Sep 13, 2012, 10:49:27 AM9/13/12
to gnu.ema...@googlegroups.com, help-gn...@gnu.org
On Thursday, 13 September 2012 22:00:53 UTC+8, Joe Corneli wrote:

> Does Emacs know which modifiers are "on" at a given moment?

Stefan Monnier

unread,
Sep 13, 2012, 11:41:14 AM9/13/12
to
> Does Emacs know which modifiers are "on" at a given moment?

Emacs could know (at least under X11 and probably under other GUIs as
well), but it currently opts to stay in the dark.


Stefan
0 new messages