A coding question

Avi Greenbury lists at avi.co
Tue Sep 6 00:17:54 UTC 2011


Curt Tresenriter wrote:

> On 9/5/2011 5:11 PM, Avi Greenbury wrote:
> > I know you are (or are trying to :) ), but a lot of this discussion
> > appears to be about the UIs of various video players for some
> > reason.
> >
> > My first idea would be to go into the keyboard shortcuts bit of
> > Gnome or KDE or whatever you're using, and try to configure those
> > buttons as the media play, pause, stop etc. buttons as if they were
> > any other keyboard shortcut. If they do present themselves as just
> > keys (which would be nice) this should work; have you tried that?
> As I said in the beginning I haven't got any experience with how all 
> this works.
> How the keyboard figures in, I also haven't a clue. I don't see how  
> keyboard shortcuts relate to buttons on the speaker unit.

I'm rather hoping the speaker unit pretends to be a keyboard to provide
those buttons, or at least the part of a keyboard that normally has
those buttons on.

There are standard buttons for the fast-forward and rewind and
play/pause buttons in much the same way as there's standards for an 'M'
key and an F1 key. A keyboard's just a device which presents itself to
the computer as a device which can send keypress signals. The way the
computer interprets keypresses is that the keyboard sends it a signal
(say, "an M key has been pressed") and the computer reacts accordingly.

There's no requirement, therefore, that something which looks like a
keyboard to a computer actually look like a keyboard to a human - it
just needs to send keypress signals in the same way to one or more
buttons.

If you go to the keyboard shortcuts dialogue, and try to set the
keyboard shortcut for fast-forward to the fast-forward button on the
speaker, it might Just Work.

Of course, it might not. I've no idea, it's just an idea and it can't
hurt to try.

> I wasn't even sure what questions to ask and it appears I haven't
> done all that good a job of that. 

No, I think you got the question quite OK, really. I've no idea how the
thread ended up derailed.

-- 
Avi




More information about the ubuntu-users mailing list