Loading ...
Sorry, an error occurred while loading the content.

Re: [jasspa] Detecting NumLock key press?

Expand Messages
  • Jon Green
    ... jon@jasspa.com replies:- Not sure if anybody has asked for this. No the feature that you asked for is not currently supported. After a quick 10 minute hack
    Message 1 of 2 , Oct 11, 2001
    • 0 Attachment
      sonicdaddy@... wrote:
      > QUESTION: Can JASSPA's UEMACS detect when the NumLock key is pressed?

      jon@... replies:-

      Not sure if anybody has asked for this.

      No the feature that you asked for is not currently supported.
      After a quick 10 minute hack then the following will provide
      you with a solution (hopefully I have not broken anything -
      but I'm pressed for time on some other work at the moment.)

      You requested Windows, I've not tested this or looked at
      these modifications in UNIX space. Changes as follows
      against the "MicroEmacs 01 - Date 01/08/01 - win32"
      version of source code.

      Changes follow (CVS Diff format), simply apply
      and re-build (also attached incase yahoo groups
      messes up the text format). The keys that I have
      added are:-

      capslock
      numlock
      pause
      scroll

      These are all by default bound to "void" i.e.
      they will not do anything. If you look at

      M-x describe-bindings

      then the keys are present but unbound. You
      can then bind these kesy (i.e. numlock) globally
      to some operation (i.e. next-buffer) using:-

      M-x global-bind-key next-buffer "numlock"

      Set all of these up in your <user>.emf

      Regards
      Jon.

      --

      cvs diff ebind.def eskeys.def winterm.c

      Index: ebind.def
      ===================================================================
      RCS file: /export/cvs/me/src/ebind.def,v
      retrieving revision 2.1
      diff -r2.1 ebind.def
      9c9
      < * Last Modified : <010804.1624>
      ---
      > * Last Modified : <011011.1900>
      64a65
      > DEFBIND (ME_SPECIAL|SKEY_capslock, 0, CK_VOIDFUNC)
      81a83
      > DEFBIND (ME_SPECIAL|SKEY_numlock, 0, CK_VOIDFUNC)
      83a86
      > DEFBIND (ME_SPECIAL|SKEY_pause, 0, CK_VOIDFUNC)
      86a90
      > DEFBIND (ME_SPECIAL|SKEY_scroll, 0, CK_VOIDFUNC)
      Index: eskeys.def
      ===================================================================
      RCS file: /export/cvs/me/src/eskeys.def,v
      retrieving revision 2.0
      diff -r2.0 eskeys.def
      9c9
      < * Last Modified : <000718.2344>
      ---
      > * Last Modified : <011011.1900>
      29a30
      > DEFSKEY ("capslock", NULL, NULL, SKEY_capslock )
      97a99
      > DEFSKEY ("numlock", NULL, NULL, SKEY_numlock )
      99a102
      > DEFSKEY ("pause", NULL, NULL, SKEY_pause )
      103a107
      > DEFSKEY ("scroll", NULL, NULL, SKEY_scroll )
      Index: winterm.c
      ===================================================================
      RCS file: /export/cvs/me/src/winterm.c,v
      retrieving revision 2.4
      diff -r2.4 winterm.c
      3026c3026,3040
      < case VK_APPS:
      ---
      > /* BEGIN JON HACK - Special keys requested by somebody !! */
      > case VK_NUMLOCK:
      > cc = SKEY_numlock ;
      > goto do_keydown;
      > case VK_CAPITAL:
      > cc = SKEY_capslock ;
      > goto do_keydown;
      > case VK_SCROLL:
      > cc = SKEY_scroll ;
      > goto do_keydown;
      > case VK_PAUSE:
      > cc = SKEY_pause ;
      > goto do_keydown;
      > /* END JON HACK - Special keys requested by somebody !! */
      > case VK_APPS:

      --
    • sonicdaddy@yahoo.com
      I ve used MicroEMACS 3.9 on various UNIX systems for years and, finally wanting to use it on Windows (98 & NT 4.0), I just discovered JASSPA. Very impressive
      Message 2 of 2 , Oct 12, 2001
      • 0 Attachment
        I've used MicroEMACS 3.9 on various UNIX systems for years and,
        finally wanting to use it on Windows (98 & NT 4.0), I just discovered
        JASSPA. Very impressive program!

        QUESTION: Can JASSPA's UEMACS detect when the NumLock key is pressed?

        In the various UNIX systems I've worked on, I've always been able to
        cobble together an emulation of the VAX/VMS EDT VT-100 keypad,
        internally via macro programming in the uemacs start-up file and/or
        externally in the OS environment. In particular, everything depends
        on the EDT "gold" key: the PF1 key, which happens to be the NumLock
        key on the PC keyboard. Under Windows, for example, I can configure
        both Exceed and the TTERMPRO telnet program to generate the PF1
        escape sequence when the NumLock key is pressed. Under Linux, I use
        the xmodmap program to configure X so that the PF1 escape sequence is
        generated when NumLock is pressed.

        I don't necessarily need the PF1 escape sequence generated, but can
        JASSPA macros detect when NumLock is pressed. I've searched through
        the documentation and tried various @cq- and @cqk-based commands, but
        with no success regarding NumLock. A search of this group's archive
        only turned up some messages regarding NumLock under UNIX.

        Thanks for any help you can offer to a JASSPA newbie,
        Alex
      Your message has been successfully submitted and would be delivered to recipients shortly.