From owner-freebsd-hackers Fri Aug 8 09:07:02 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id JAA26036 for hackers-outgoing; Fri, 8 Aug 1997 09:07:02 -0700 (PDT) Received: from sos.freebsd.dk (sos.freebsd.dk [195.8.129.33]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id JAA26030 for ; Fri, 8 Aug 1997 09:06:55 -0700 (PDT) Received: (from sos@localhost) by sos.freebsd.dk (8.8.7/8.7.3) id SAA02524; Fri, 8 Aug 1997 18:06:44 +0200 (MEST) From: Søren Schmidt Message-Id: <199708081606.SAA02524@sos.freebsd.dk> Subject: Re: How to get state of ctrl, alt, shift keys ? In-Reply-To: from System Administrator at "Aug 8, 97 03:14:13 pm" To: root@goff.comtat.kazan.su (System Administrator) Date: Fri, 8 Aug 1997 18:06:44 +0200 (MEST) Cc: hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL30 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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 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 ..