Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Aug 1997 18:06:44 +0200 (MEST)
From:      Søren Schmidt <sos@sos.freebsd.dk>
To:        root@goff.comtat.kazan.su (System Administrator)
Cc:        hackers@FreeBSD.ORG
Subject:   Re: How to get state of ctrl, alt, shift keys ?
Message-ID:  <199708081606.SAA02524@sos.freebsd.dk>
In-Reply-To: <AA5VpwpqZ5@goff.comtat.kazan.su> from System Administrator at "Aug 8, 97 03:14:13 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
In reply to System Administrator who wrote:
>                                 Hi, All!
> 
>         Can anybody help me? I need for my programm to get stat of the keys
>         ctl,alt,shift - well, You know for this combinations, like Ctrl+PgUP
>         and so on. Question: How can I do this? In Linux I use ioctl call
>         with parameter TIOCLINUX and get (int) with values. Is there are
>         some similar simple way to FreeBSD ? I would be thankful for reply
>         to this question. And, if it is possible, send a copy of reply to
>         my E-mail, cause I'm not in mailinglist :(

You can use the KDGKBSTATE ioctl to read the modifier keys, see <console.h>

What do you want that for ?? If you need different value for ctrl/alt PgUP
then you could modify the keymap to return different values, that should
be alot easier...

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Søren Schmidt               (sos@FreeBSD.org)               FreeBSD Core Team
                Even more code to hack -- will it ever end
..



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708081606.SAA02524>