[gnome-bluetooth] using bluetooth for remote control
Bastien Nocera
hadess at hadess.net
Mon Oct 20 12:22:53 BST 2003
On Mon, 2003-10-20 at 06:19, Damien Covey wrote:
> I've gotten this to work with Xmms which is nice. Now I am trying to
> modify it to work with Rhythmbox. I dont think it will be too hard to
> have it change songs and pause. My plan is to have it fake a keypress.
> Herein lies my problem. I do not know how to fake a keypress in Ruby.
> Actually, it need not be in Ruby, a command line tool would do,
> anything at the moment would be better than what I have found.
>
> By generating a keypress (scancode 153) it will be picked up by
> Rhythmbox as one of the 'multimedia' keys on my keyboard. Bastien, I
> thought you might have the know how here as you wrote Acme if I recall
> correctly. So, can anyone help with programmatically generating a
> keypress? I know this is not completely bluetooth related, but it is
> in a round about way and I haven't gotten any answers elsewhere I have
> posted.
Faking a keypress is rather wonky. You can however find code that does
that in Totem's src/scrsaver.c using the XTest extension and
XTestFakeKeyEvent.
Cheers
---
Bastien Nocera <hadess at hadess.net>
She was as easy as the Daily Star crossword.
More information about the gnome-bluetooth
mailing list