From owner-freebsd-questions@FreeBSD.ORG Wed Jan 16 09:39:15 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38C6016A418 for ; Wed, 16 Jan 2008 09:39:15 +0000 (UTC) (envelope-from christopher.illies@ki.se) Received: from smtp2.ki.se (smtp2.ki.se [130.237.98.101]) by mx1.freebsd.org (Postfix) with ESMTP id 7F3D813C43E for ; Wed, 16 Jan 2008 09:39:14 +0000 (UTC) (envelope-from christopher.illies@ki.se) Received: from smtp2.ki.se (smtp2.ki.se [127.0.0.1]) by localhost (Postfix) with SMTP id 196B0534C8F; Wed, 16 Jan 2008 10:39:13 +0100 (CET) Received: from Klabautermann.ks.se (unknown [136.155.136.187]) by smtp2.ki.se (Postfix) with ESMTP id 7A36C534E57; Wed, 16 Jan 2008 10:39:11 +0100 (CET) Received: from Klabautermann.ks.se (localhost [127.0.0.1]) by Klabautermann.ks.se (8.14.2/8.14.2) with ESMTP id m0G9ddCs092539; Wed, 16 Jan 2008 10:39:39 +0100 (CET) (envelope-from chris@Klabautermann.ks.se) Received: (from chris@localhost) by Klabautermann.ks.se (8.14.2/8.14.2/Submit) id m0G9dcDA092522; Wed, 16 Jan 2008 10:39:38 +0100 (CET) (envelope-from chris) Date: Wed, 16 Jan 2008 10:39:38 +0100 From: Christopher Illies To: Timothy Bourke Message-ID: <20080116093938.GB3852@Klabautermann.ks.se> Mail-Followup-To: Timothy Bourke , freebsd-questions@freebsd.org References: <20080114110929.GB887@triptrop.cse.unsw.EDU.AU> <20080115105832.GA14265@Klabautermann.ks.se> <20080115114809.GA851@triptrop.cse.unsw.EDU.AU> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080115114809.GA851@triptrop.cse.unsw.EDU.AU> User-Agent: Mutt/1.4.2.3i X-PMX-Version: 5.4.1.325704, Antispam-Engine: 2.6.0.325393, Antispam-Data: 2008.1.16.12657 X-PerlMx-Spam: Gauge=IIIIIII, Probability=7%, Report='__CD 0, __CT 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Cc: freebsd-questions@freebsd.org Subject: Re: Reinterpret gamepad input as keyboeard input X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2008 09:39:15 -0000 On Tue, Jan 15, 2008 at 10:48:09PM +1100, Timothy Bourke wrote: > On Jan 15 at 11:58 +0100, Christopher Illies wrote: > > On Mon, Jan 14, 2008 at 10:09:30PM +1100, Timothy Bourke wrote: > > > On Jan 14 at 08:12 +0100, Christopher Illies wrote: > > > > I have a gamepad and would like to make certain gamepad actions to be > > > > seen as regular keyboard input. Is this possible? > > > > > > > > I tried out usbhidaction with something like: > > > > Generic_Desktop:Game_Pad.Button:Button_1 1 1 /bin/echo -n ls > > > > > > > > Obviously, this approach does not work as I hoped. "ls" is echoed in a > > > > shell window, but it is not interpreted as input. > > > > > > Would vkbd(4) do the trick? > > > > Thank you, vkbd sounds interesting. It looks like that there are no > > shell commands to create input to a virtual keyboard, so I will have > > to write my own. > > I don't know about that part of it. I looked at vkbd a long time ago > when trying to make a Super Nintendo controller driver work as a > keyboard. Vkbd almost did the trick, but it's intended to work from > user mode. > > It occurred to me, after my post, that if your script need only work > under X-windows, there are probably have more options for generating > keyboard events. You could, for example, look at x11/padkey, > particularly the doXKey() call. > > Best regards, > > Tim. Thanks for thank hint. I looked a bit into vkbd now and I also came across your post from February 2007. I agree, the fact that /dev/vkbdctl does not appear by default is confusing. Christopher