Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Jan 2008 10:39:38 +0100
From:      Christopher Illies <christopher.illies@ki.se>
To:        Timothy Bourke <timbob@bigpond.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Reinterpret gamepad input as keyboeard input
Message-ID:  <20080116093938.GB3852@Klabautermann.ks.se>
In-Reply-To: <20080115114809.GA851@triptrop.cse.unsw.EDU.AU>
References:  <20080114110929.GB887@triptrop.cse.unsw.EDU.AU> <20080115105832.GA14265@Klabautermann.ks.se> <20080115114809.GA851@triptrop.cse.unsw.EDU.AU>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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