in reply to Get Numlock Status

Curses may let you see this, I haven't checked. You'll probably be wanting to use Curses anyways so you can manage your screen for things like your status bar.

--
I'm not belgian but I play one on TV.

Replies are listed 'Best First'.
Re: Re: Get Numlock Status
by Mr_Person (Hermit) on Jul 04, 2003 at 16:21 UTC
    Actually, my screen for output is a 2x20 Matrix Orbital VFD, so I don't think Curses will work too well for managing output, and I wasn't able to find anything on using it for input that would allow me get an event when Numlock is changed.
      I've looked into a bit further... The event is available to usermode apps as showkey detects it (I get keycode 69), however I was unable to getch() it. It may be terminal specific, and you might have better luck searching the web for relevant information than I did.

      --
      I'm not belgian but I play one on TV.

        Thanks for the help! After some more searching and taking a look at the showkey sources, I was able to recreate most of the functionality of showkey in Perl (at least enough to capture numlock presses). I've posted an example program here in case anyone else is interested.