From owner-freebsd-questions@FreeBSD.ORG Fri Oct 25 18:44:48 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8E1B526F for ; Fri, 25 Oct 2013 18:44:48 +0000 (UTC) (envelope-from kline@thought.org) Received: from p3plsmtpa06-02.prod.phx3.secureserver.net (p3plsmtpa06-02.prod.phx3.secureserver.net [173.201.192.103]) by mx1.freebsd.org (Postfix) with ESMTP id 68E2E29E0 for ; Fri, 25 Oct 2013 18:44:48 +0000 (UTC) Received: from ethic.thought.org ([209.180.213.209]) by p3plsmtpa06-02.prod.phx3.secureserver.net with id hWjA1m00G4XeM0101WjAmQ; Fri, 25 Oct 2013 11:43:12 -0700 Date: Fri, 25 Oct 2013 11:42:33 +0000 From: Gary Kline To: Polytropon Subject: Re: howto recognize the Shift and Alt keys when /pressed\ Message-ID: <20131025114233.GA28606@ethic.thought.org> References: <20131021161200.GA18556@ethic.thought.org> <20131022012804.98a017fa.freebsd@edvax.de> <20131021164926.GA19974@ethic.thought.org> <20131022125901.6f3366fd.freebsd@edvax.de> <20131022121555.GA24386@ethic.thought.org> <20131022221027.30108304.freebsd@edvax.de> <20131023163805.GA7143@ethic.thought.org> <20131024021132.44324417.freebsd@edvax.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131024021132.44324417.freebsd@edvax.de> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: FreeBSD Mailing List X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Oct 2013 18:44:48 -0000 Organization: Thought Unlimited. Public service Unix since 1986. Of_Interest: With 27 years of service to the Unix community. my shoulder went out, sorry!! On Thu, Oct 24, 2013 at 02:11:32AM +0200, Polytropon wrote: > On Wed, 23 Oct 2013 16:38:05 +0000, Gary Kline wrote: > Linux, you should make sure you rely on a sound output system > that is present on all of them (requires 3rd party library). > The same will probably be true for accessing the keyboard in > a "low level" manner, but I'm almost sure this works very > different in Linux and the BSDs... > > > you need to get your hands dirty in hardware-related system > source code, for example the keyboard input driver (one level > above atkbd and ukbd, one level below terminal I/O). > > > > > my c = getch() isnt doing anything with the modifier keys. > > Of course not. It simply reads from the keyboard input buffer > (which is a _character buffer_), and the modifier keys don't > add anything to that buffer. > > > > > *this* may be why xset fails. there may have been no generic > > way of getting xset working as broadly as it had to, ?, so > > the keyclick stuff wasnt touched. > > What are you using xset for? I know there's "xset c 100", but > I never saw that working... > > > > > FWIW: I've got the arrow keys working. page up/down, home, > > end too. > > Those have equivalents in ncurses and also send data to the > keyboard buffer (usually a two byte sequence or escape codes). > > > > > wrote was for the PDP-8! IF I can use the 64bit intel > > assembler to grab the keys I want and return to the rest > > of my C/ncurses prog, that might work. > > > > anybody know if this makes any sense? > > No need to re-invent the wheel here. Just "attach to" the > responsible components of the OS mentioned above. In C. :-) > > I wonder if I could take the src of xev.c and then, seeing what it does when I click on CTRL, ATL, CAPS LOCK, anf SHIFT. MAke any sense? > > -- > Polytropon > Magdeburg, Germany > Happy FreeBSD user since 4.0 > Andra moi ennepe, Mousa, ... > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" -- Gary Kline kline@thought.org http://www.thought.org Public Service Unix Twenty-seven years of service to the Unix community. http://www.thought.org/HOPE