Author Topic: Media Buttons  (Read 1958 times)

0 Members and 1 Guest are viewing this topic.

Offline sam113101

  • Thread Starter
  • Posts: 213
Media Buttons
« on: Mon, 25 October 2010, 20:14:37 »
I'm just wondering how they work, because it doesn't seem like they are sending any data to the OS.

When I raise the volume using my DAS and its multimedia button (that is basically where the left winkey is supposed to be), it sends null bytes to the OS, I guess that the only use for this is to leave the screen saver when it's on.

I also have a keyboard that can open my browser with just a press on a button.

How does that work*?

Also, I bought a prepaid credit card to buy a Unicomp keyboard. I would have paid it with paypal, but it's not available as a payment method. As soon as I bought it, I received a mail telling me they will email me again when the keyboard is shipped. That was 3 days ago and no transaction have been made on my credit card since that day.

Is it normal*? Why is it taking that long*?
Thanks.
Hoping to hear from you again, your dearest friend, sam113101.

Offline wap32

  • Posts: 60
Media Buttons
« Reply #1 on: Mon, 25 October 2010, 20:26:21 »
I always though they were just special scancodes...
At least thats how they appear on my laptop.

Offline kps

  • Posts: 410
Media Buttons
« Reply #2 on: Mon, 25 October 2010, 21:00:45 »
Quote from: sam113101;238712
I'm just wondering how they work, because it doesn't seem like they are sending any data to the OS.

They are sending data, but they may not be sending 'keyboard' data.

As I'm sure you know, USB supports many different kinds of device (disks, scanners, printers, etc.) and in particular different kinds of input device, besides keyboards — mice, joysticks, tablets, and so on.

And you're probably aware of combination devices, e.g. a keyboard with a built-in trackpad or trackpoint. With USB, media buttons are like a separate device built in with the keyboard. They use what USB calls the "Consumer Page", with a different set of codes from the "Keyboard Page". The OS sees them, but not as regular keystrokes.

(There is potentially some overlap; there are actually keyboard codes for volume and mute (but not things like play/pause or application launch buttons), and there are Consumer Page codes for some things that have traditional keyboard codes, like copy/paste. USB input is a big complicated mess.)

Offline kps

  • Posts: 410
Media Buttons
« Reply #3 on: Mon, 25 October 2010, 22:53:32 »
Far from an expert. I'm having to learn a little for my keyboard project, but the USB specifications are possibly the most difficult to follow that I've encountered in 30 years of programming — a twisty little maze of Endpoints and Pages and Descriptors, with an assiduous determination to never actually come out and say which bits go where.

Offline wap32

  • Posts: 60
Media Buttons
« Reply #4 on: Tue, 26 October 2010, 06:20:00 »
Quote from: kps;238721
(There is potentially some overlap; there are actually keyboard codes for volume and mute (but not things like play/pause or application launch buttons), and there are Consumer Page codes for some things that have traditional keyboard codes, like copy/paste. USB input is a big complicated mess.)


This might not be strictly true. I have 2 PS/2 keyboards that both have play/pause/next/forward buttons, as well as special application keys.

They all work natively on windows/linux so there must be some standard keycodes for those functions.

Offline Rajagra

  • Posts: 1930
Media Buttons
« Reply #5 on: Tue, 26 October 2010, 08:16:42 »
KeyTweak allows you to map keys in the registry to act as:
Play/Pause; Stop; Volume Up; Volume Down; Mute; Last Track; Next Track; Media Select; Eject.
I'm sure that means that all of those functions have standardised keyboard scan codes. Though many older keyboards may use non-standard or even hidden codes that only work with their own drivers.

Offline kps

  • Posts: 410
Media Buttons
« Reply #6 on: Tue, 26 October 2010, 09:44:28 »
Quote from: wap32;238799
This might not be strictly true. I have 2 PS/2 keyboards that both have play/pause/next/forward buttons, as well as special application keys.


What I wrote applies to USB, which separates things into different 'pages' (Keyboard, Consumer, etc.) to allow more than 256 different functions.

PS/2 just has one set of scan codes, of variable length (one to three bytes) using special prefixes. Extra codes can be added as long as the keyboard and OS agree -- in other words, by Microsoft.

I'm not a gamer; I forgot that there are still new PS/2 keyboards made, probably because the USB spec is so baroque that no one can figure out how to implement a non-boot-mode device.

woody

  •  Guest
Media Buttons
« Reply #7 on: Tue, 26 October 2010, 09:50:23 »
Quote from: kps;238883
PS/2 just has one set of scan codes, of variable length (one to three bytes) using special prefixes. Extra codes can be added as long as the keyboard and OS agree -- in other words, by Microsoft.

PS/2 has at least three sets of codes, of which most keyboards support only one.
________
Windsor Transmission
« Last Edit: Sat, 05 February 2011, 14:03:04 by woody »

Offline wap32

  • Posts: 60
Media Buttons
« Reply #8 on: Tue, 26 October 2010, 10:21:51 »
Quote from: kps;238883
What I wrote applies to USB, which separates things into different 'pages' (Keyboard, Consumer, etc.) to allow more than 256 different functions.

PS/2 just has one set of scan codes, of variable length (one to three bytes) using special prefixes. Extra codes can be added as long as the keyboard and OS agree -- in other words, by Microsoft.

I'm not a gamer; I forgot that there are still new PS/2 keyboards made, probably because the USB spec is so baroque that no one can figure out how to implement a non-boot-mode device.


I understood that, I was just saying that there are standard media/application scancodes.
Whether it is a USB or PS/2 keyboard, it can send one of those codes and the host will recognize it (OS dependent of course) as play/pause/whatevs.

Offline Rajagra

  • Posts: 1930
Media Buttons
« Reply #9 on: Tue, 26 October 2010, 13:30:20 »
Quote from: ripster;238889
The Sidewinder X4 runs at USB Full Duplex.


Remind me, is this a keyboard or an acoustic coupler?

Offline kps

  • Posts: 410
Media Buttons
« Reply #10 on: Tue, 26 October 2010, 14:10:02 »
Quote from: ripster;239024
He likes USB.


But he doesn't know how to debounce properly.

Offline itlnstln

  • Posts: 7048
Media Buttons
« Reply #11 on: Tue, 26 October 2010, 14:16:03 »
It's the theory vs. actual debate.  Just because I understand the ideas, concepts, etc. doesn't mean I can execute it.  Think sports coaches.  They might know how to play the game, they best way to play the game, etc., but many of them can't play it themselves.

These people are typically called "the business."  Other than maybe a software company here and there, you will probably never see a corporate VP code their own software solution.

Mark Mangino:
« Last Edit: Tue, 26 October 2010, 14:18:17 by itlnstln »


Offline keyboardlover

  • Posts: 4022
  • Hey Paul Walker, Click It or Ticket!
    • http://www.keyboardlover.com
Media Buttons
« Reply #12 on: Tue, 26 October 2010, 14:17:01 »
Good point. Take Andy Reid.