Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!tut.cis.ohio-state.edu!THEORY.LCS.MIT.EDU!mic From: mic@THEORY.LCS.MIT.EDU Newsgroups: gnu.emacs.bug Subject: can a command know its invoking key sequence? Message-ID: <8911151740.AA16000@hummingbird.LCS.MIT.EDU> Date: 15 Nov 89 17:40:01 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 16 This is a help request. If a command is bound to several different key sequences, is there a way for it to know which way it was called? The closest thing I've found is to parse over the last hundred keystrokes reported by (recent-keys), saving the last valid key sequence (there are pathological examples showing that this method cannot always work correctly). I am hoping for a more efficient and correct solution. ---- Mic Grigni (on vacation for a day after STOC submissions) PS: I know of course that commands shouldn't generally depend on their calling keystroke, but I think I have a semi-valid use here. I want a function that will auto-detect and load definitions for various different kinds of keyboards, where emacs doesn't know what kind of keyboard you have until you hit a function key (TERM doesn't tell you).