Difference between revisions of "Media key"

From Deskthority wiki
Jump to navigation Jump to search
(Moved "multimedia keyboard" contents here. Added linear controls, that aren't really keys..)
(Moving Codes to Scancode)
 
(10 intermediate revisions by the same user not shown)
Line 16: Line 16:
 
On some keyboard, media key functions are on [[Function key]]s when holding a [[Fn key]].
 
On some keyboard, media key functions are on [[Function key]]s when holding a [[Fn key]].
  
On some Apple keyboards such as the [[Apple Aluminium Keyboard|aluminium keyboards]], the default behaviour is the reverse: numbered [[Function key]]s are available on the media keys when holding down Fn.
+
On the Apple [[Apple Aluminium Keyboard|aluminium keyboards]] with MacOS, the default behaviour is the reverse: numbered [[function key]]s are available on the media keys when holding down Fn. This behaviour can be switched in MacOS.
  
 
On some PC keyboards from Microsoft, the Fn "key" is not a modifier key but a toggle switch.
 
On some PC keyboards from Microsoft, the Fn "key" is not a modifier key but a toggle switch.
Line 34: Line 34:
 
!Fn-F11
 
!Fn-F11
 
!Fn-F12
 
!Fn-F12
!
+
!Other
!Print Screen
 
!Scroll lock
 
!Pause
 
!(Dedicated keys)
 
 
|-
 
|-
| [[SteelSeries 6GV2]]
+
| [[Apple Aluminium Keyboard]] A1243
 +
| Brightness Down
 +
| Brightness Up
 +
| Exposé / Mission Control
 +
| Dashboard / Launchpad
 +
|
 +
|
 +
| Rewind (Previous track)
 +
| Play/Pause
 +
| Fast Forward (Next track)
 
| Mute
 
| Mute
 
| Volume Down
 
| Volume Down
 
| Volume Up
 
| Volume Up
| Play / Pause
+
| Eject, F13..F19
| Previous Track
+
|-
| Next Track
+
| Arachnid Recore
|
+
|  
|
 
|
 
 
|
 
|
 
|
 
|
 
|
 
|
 +
| Play/Pause
 +
| Stop
 +
| Previous track
 +
| Next track
 +
| Media player
 +
| Mute
 +
| Volume Down
 +
| Volume Up
 
|
 
|
 +
|-
 +
| [[Cooler Master QuickFire Rapid|CMStorm QuickFire Rapid]]
 +
|
 
|
 
|
 
|
 
|
 
|
 
|
 +
| Play/Pause
 +
| Stop
 +
| Previous track
 +
| Next track
 
|
 
|
 +
| Mute
 +
| Volume Down
 +
| Volume Up
 +
|
 
|-
 
|-
 
| [[Ducky]] G2Pro/Shine
 
| [[Ducky]] G2Pro/Shine
Line 63: Line 85:
 
| Volume Down
 
| Volume Down
 
| Volume Up
 
| Volume Up
| Play / Pause
+
| Play/Pause
 
| Stop
 
| Stop
 
| Previous track
 
| Previous track
Line 69: Line 91:
 
|
 
|
 
|  
 
|  
|
 
|
 
|
 
|
 
 
|
 
|
 
|
 
|
Line 82: Line 100:
 
| Volume Down
 
| Volume Down
 
| Volume Up
 
| Volume Up
| Play / Pause
+
| Play/Pause
 
| Previous track
 
| Previous track
 
| Next track
 
| Next track
Line 88: Line 106:
 
|
 
|
 
|  
 
|  
|
 
|
 
|
 
|
 
 
|
 
|
 
|
 
|
Line 97: Line 111:
 
|
 
|
 
|-
 
|-
| [[Cooler Master QuickFire Rapid|CMStorm QuickFire Rapid]]
+
| KeyCool 84, KeyCool 87
|  
+
| Computer
|
+
| Home/Browser
|
+
| Calculator
|
+
| Media Player
| Play / Pause
+
| Previous Track
 +
| Next Track
 +
| Play/Pause
 
| Stop
 
| Stop
| Previous track
 
| Next track
 
|
 
 
| Mute
 
| Mute
 
| Volume Down
 
| Volume Down
 
| Volume Up
 
| Volume Up
|  
+
| (Windows lock)
|
 
|
 
|
 
 
|
 
|
 
|-
 
|-
| [[Apple Aluminium Keyboard]] A1243
+
| KeyCool 108
| Brightness Down
+
| Computer
| Brightness Up
+
| Home/Browser
| Exposé / Mission Control
+
| Mail
| Dashboard / Launchpad
+
| Media Player
|
+
| Previous Track
|
+
| Next Track
| Rewind
 
 
| Play/Pause
 
| Play/Pause
| Fast Forward
+
| Stop
 
| Mute
 
| Mute
 
| Volume Down
 
| Volume Down
 
| Volume Up
 
| Volume Up
| Eject
+
| (Windows lock)
| F13
+
| Lock Sleep, Calculator, ... ?
| F14
 
| F15
 
| F16 F17 F18 F19
 
|-
 
|}
 
 
 
== Protocol ==
 
Media keys usually emit distinct codes to the host.
 
 
 
===USB===
 
In the [[USB]] HID ("Human Interface Device") standard, while most key codes are in the "Keyboard/Keypad" usage page (0x07), most most media keys are in "Consumer" usage page (0x0C). System control keys (Power, Sleep, Wake) are in the "Generic Desktop" usage page (0x01).
 
 
 
The "Consumer Usage Page" has also codes for ''linear'' relative values for volume control, bass and treble. While it may appear to be analogue, the knob or roller is usually connected to a [[rotary encoder]].
 
The values are relative to the volume level set by the user in the operating system and application software. If the controls had absolute values, they would have needed to be motorized and under computer control, which is something that the USB HID specification does not support.
 
 
 
The controls in each Usage Page are transmitted in a separate packet. Therefore, media keys may have separate [[rollover]] characteristics from regular keys.
 
 
 
===PS/2===
 
For [[PS/2]], Microsoft has standardized media key [[scancode]]s for [[Microsoft Windows|Windows]].
 
 
 
Some vendors have used their own codes that have been activated first after having received a "magic" code from the host's keyboard driver.
 
 
 
===Codes===
 
There are more codes in the USB standard that those below, but not all are supported by major operating systems and apps.
 
<ref>Universal Serial Bus (USB): HID Usage Tables,10/28/2004,Version 1.12</ref>
 
<ref>Windows Platform Design Notes: Keyboard Scan Code Specification,
 
Revision 1.3a; revised March 2000. Retrieved from [http://msdn.microsoft.com/en-us/windows/hardware/gg463372.aspx Archive: Key Support, Keyboard Scan Codes, and Windows] on 2013-09-19</ref>
 
<ref>USB HID to PS/2 Scan Code Translation Table. Retrieved from [http://msdn.microsoft.com/en-us/windows/hardware/gg463372.aspx Archive: Key Support, Keyboard Scan Codes, and Windows] on 2013-09-19</ref>
 
<ref>Sun USB media key mappings, extracted from looking at the source code of [https://github.com/stefanberndtsson/type5usb type5usb].</ref>.
 
 
 
Values are in hexadecimal.
 
 
 
{|class="wikitable"
 
! Function
 
! colspan="3" | USB
 
! colspan="2" | PS/2 (set 2)
 
! colspan="4" | OS support
 
|-
 
! System
 
! Page
 
! Code
 
! Type
 
! Make
 
! Break
 
! Windows
 
! Mac
 
! X
 
! Sun
 
|-
 
| rowspan="2" | Power
 
| 01
 
| 81
 
| One-shot
 
| rowspan="2" | E0 37
 
| rowspan="2" | E0 F0 37
 
| Windows 95
 
|
 
| X
 
|
 
|-
 
| 07
 
| 66
 
| One-shot
 
|
 
| Mac
 
| X
 
| Sun
 
 
|-
 
|-
| Sleep
+
| Matias Quiet Pro Mini (PC)
| 01
+
| Rewind (Previous track)
| 82
+
| Forward (Next track)
| One-shot
 
| E0 3F
 
| E0 F0 3F
 
| Windows 95
 
|
 
|
 
 
|
 
|
|-
 
| Wake
 
| 01
 
| 83
 
| One-shot
 
| E0 5E
 
| E0 F0 5E
 
| Windows 95
 
 
|
 
|
 
|
 
|
 
|
 
|
|-
 
! Media
 
! Page
 
! Code
 
! Type
 
! Make
 
! Break
 
! Windows
 
! Mac
 
! X
 
! Sun
 
|-
 
| Next Track
 
| 0C
 
| B5
 
| One-shot
 
| E0 4D
 
| E0 F0 4D
 
| Windows
 
| Mac
 
| X
 
 
|
 
|
|-
 
| Previous Track
 
| 0C
 
| B5
 
| One-shot
 
| E0 15
 
| E0 F0 15
 
| Windows
 
| Mac
 
| X
 
|
 
|-
 
| Stop
 
| 0C
 
| B7
 
| One-shot
 
| E0 3B
 
| E0 F0 3B
 
| Windows
 
| Mac
 
| X
 
 
|
 
|
|-
 
| Eject
 
| 0C
 
| B8
 
| One-shot
 
 
|
 
|
|
 
 
|
 
|
| Mac
 
 
|
 
|
 
|
 
|
 +
| Play/Pause on Esc, Mute Volume Up/Down on Fn-Arrow key
 
|-
 
|-
| Play / Pause
+
| Max Keyboard Blackbird
| 0C
+
| Mute
| CD
+
| Volume Down
| One-shot
+
| Volume Up
| E0 34
+
| Play/Pause
| E0 F0 34
+
| Previous Track
| Windows
+
| Next Track
| Mac
 
| X
 
|
 
|-
 
| Volume (knob)
 
| 0C
 
| E0
 
| Linear
 
|  
 
|
 
| Windows 98
 
 
|
 
|
 
|
 
|
 
|
 
|
|-
 
| rowspan="2" | Mute
 
| 0C
 
| E2
 
| On/off
 
| rowspan="2" | E0 23
 
| rowspan="2" | E0 F0 23
 
| Windows 98
 
| Mac
 
| X
 
 
|
 
|
|-
 
| 07
 
| 7F
 
| One-shot
 
|
 
|
 
|
 
| Sun
 
|-
 
| Bass (knob)
 
| 0C
 
| E3
 
| Linear
 
|
 
|
 
| Windows 2000
 
 
|
 
|
 
|
 
|
 
|
 
|
 
|-
 
|-
| Treble (knob)
+
| Mionix Zibal 60
| 0C
+
| Mute
| E4
+
| Volume Down
| Linear
+
| Volume Up
|  
 
 
|
 
|
| Windows 2000
+
| Play/Pause
|
+
| Stop
|
+
| Previous Track
|
+
| Next Track
|-
 
| Bass Boost
 
| 0C
 
| E5
 
| On/off
 
 
|
 
|
 
|
 
|
| Windows 98
 
 
|
 
|
 
|
 
|
 
|
 
|
 
|-
 
|-
| Loudness
+
| Noppoo Lolita
| 0C
+
| My Computer
| E7
+
| Web Browser
| On/off
+
| Calculator
|  
+
| Media Player
|
+
| Previous Track
| Windows 2000
+
| Next Track
|
+
| Play/Pause
|
+
| (NKRO)
|
+
| Mute
|-
+
| Volume Down
| rowspan="2" | Volume Up
+
| Volume Up
| 0C
 
| E9
 
| Re-trigger
 
| rowspan="2" | E0 32
 
| rowspan="2" | E0 F0 32
 
| Windows 98
 
| Mac
 
| X
 
|
 
|-
 
| 07
 
| 80
 
| One-shot
 
|
 
 
|  
 
|  
 
|  
 
|  
| Sun
 
 
|-
 
|-
| rowspan="2" | Volume Down
+
| Noppoo Lolita Spyder
| 0C
+
| Previous Track
| EA
+
| Play/Pause
| Re-trigger
+
| Next Track
| rowspan="2" | E0 21
+
| Stop
| rowspan="2" | E0 F0 21
+
| Mute
| Windows 98
+
| Volume Down
| Mac
+
| Volume Up
| X
 
 
|  
 
|  
|-
 
| 07
 
| 81
 
| One-shot
 
|
 
 
|  
 
|  
 
|  
 
|  
| Sun
 
|-
 
| Bass Up
 
| 0C
 
| 0152
 
| Re-trigger
 
 
|  
 
|  
|
 
| Windows 2000
 
|
 
|
 
|
 
|-
 
| Bass Down
 
| 0C
 
| 0153
 
| Re-trigger
 
 
|  
 
|  
|
 
| Windows 2000
 
|
 
|
 
|
 
|-
 
| Treble Up
 
| 0C
 
| 0154
 
| Re-trigger
 
 
|  
 
|  
|
 
| Windows 2000
 
|
 
|
 
|
 
 
|-
 
|-
| Treble Down
+
| Plum 96
| 0C
+
| Mute
| 0155
+
| Volume Down
| Re-trigger
+
| Volume Up
|  
+
| Play/Pause
|
+
| Previous Track
| Windows 2000
+
| Next Track
 +
| Home/Browser
 +
| My computer
 
|
 
|
 +
| (Debounce dec)
 +
| (Debounce inc)
 
|
 
|
 
|
 
|
 
|-
 
|-
! Launch application
+
| [[SteelSeries 6GV2]]
! Page
+
| Mute
! Code
+
| Volume Down
! Type
+
| Volume Up
! Make
+
| Play/Pause
! Break
+
| Previous Track
! Windows
+
| Next Track
! Mac
 
! X
 
! Sun
 
|-
 
| Media Player
 
| 0C
 
| 0183
 
| Selector
 
| E0 50
 
| E0 F0 50
 
| Windows
 
|
 
|
 
|
 
|-
 
| Email
 
| 0C
 
| 018A
 
| Selector
 
| E0 48
 
| E0 F0 48
 
| Windows
 
|
 
|
 
|
 
|-
 
| Calculator
 
| 0C
 
| 0192
 
| Selector
 
| E0 2B
 
| E0 F0 2B
 
| Windows
 
|
 
|
 
|
 
|-
 
| My Computer
 
| 0C
 
| 0194
 
| Selector
 
| E0 40
 
| E0 F0 40
 
| Windows
 
|
 
|
 
|
 
|-
 
! Web browser
 
! Page
 
! Code
 
! Type
 
! Make
 
! Break
 
! Windows
 
! Mac
 
! X
 
! Sun
 
|-
 
| Search
 
| 0C
 
| 0221
 
| Selector
 
| E0 10
 
| E0 F0 10
 
| Windows
 
|
 
|
 
|
 
|-
 
| Browser/Home
 
| 0C
 
| 0223
 
| Selector
 
| E0 3A
 
| E0 F0 3A
 
| Windows
 
|
 
|
 
|
 
|-
 
| Back
 
| 0C
 
| 0224
 
| Selector
 
| E0 38
 
| E0 F0 38
 
| Windows
 
|
 
|
 
|
 
|-
 
| Forward
 
| 0C
 
| 0225
 
| Selector
 
| E0 30
 
| E0 F0 30
 
| Windows
 
|
 
|
 
|
 
|-
 
| Stop
 
| 0C
 
| 0226
 
| Selector
 
| E0 28
 
| E0 F0 28
 
| Windows
 
|
 
|
 
 
|
 
|
|-
 
| Refresh
 
| 0C
 
| 0227
 
| Selector
 
| E0 20
 
| E0 F0 20
 
| Windows
 
 
|
 
|
 
|
 
|
 
|
 
|
|-
 
| Bookmarks
 
| 0C
 
| 022A
 
| Selector
 
| E0 18
 
| E0 F0 18
 
| Windows
 
 
|
 
|
 
|
 
|
 
|
 
|
 
|}
 
|}
 +
 +
== Protocol ==
 +
Media keys usually emit distinct codes to the host.
 +
 +
===USB===
 +
In the [[USB]] HID ("Human Interface Device") standard, while most key codes are in the "Keyboard/Keypad" usage page (0x07), most most media keys are in "Consumer" usage page (0x0C). System control keys (Power, Sleep, Wake) are in the "Generic Desktop" usage page (0x01).
 +
 +
The "Consumer Usage Page" has also codes for ''linear'' relative values for volume control, bass and treble. While it may appear to be analogue, the knob or roller is usually connected to a [[rotary encoder]].
 +
The values are relative to the volume level set by the user in the operating system and application software. If the controls had absolute values, they would have needed to be motorized and under computer control, which is something that the USB HID specification does not support.
 +
 +
The controls in each Usage Page are transmitted in a separate packet. Therefore, media keys may have separate [[rollover]] characteristics from regular keys.
 +
 +
===PS/2===
 +
For [[PS/2]], Microsoft has standardized media key [[scancode]]s for [[Microsoft Windows|Windows]].
 +
 +
Some vendors have used their own codes that have been activated first after having received a "magic" code from the host's keyboard driver.
  
 
==References==
 
==References==
Line 591: Line 267:
  
 
[[Category:Keyboard keys]]
 
[[Category:Keyboard keys]]
[[Category:Keyboard modding]]
 

Latest revision as of 16:48, 7 May 2018

A Media key is a key with a special purpose for a specific type of applications or operating system functions. Normally, these functions are concerned with media playback, but the term has been used for other functions as well.

A media key can be a dedicated key, or another key can act like a media key in conjunction with the Fn key. Some USB keyboards contain also a knob or roller, usually for volume control.

Gallery

Function-key mappings

On many keyboards, media keys are dedicated keys with no other function.

On some keyboard, media key functions are on Function keys when holding a Fn key.

On the Apple aluminium keyboards with MacOS, the default behaviour is the reverse: numbered function keys are available on the media keys when holding down Fn. This behaviour can be switched in MacOS.

On some PC keyboards from Microsoft, the Fn "key" is not a modifier key but a toggle switch.

Keyboard Fn-F1 Fn-F2 Fn-F3 Fn-F4 Fn-F5 Fn-F6 Fn-F7 Fn-F8 Fn-F9 Fn-F10 Fn-F11 Fn-F12 Other
Apple Aluminium Keyboard A1243 Brightness Down Brightness Up Exposé / Mission Control Dashboard / Launchpad Rewind (Previous track) Play/Pause Fast Forward (Next track) Mute Volume Down Volume Up Eject, F13..F19
Arachnid Recore Play/Pause Stop Previous track Next track Media player Mute Volume Down Volume Up
CMStorm QuickFire Rapid Play/Pause Stop Previous track Next track Mute Volume Down Volume Up
Ducky G2Pro/Shine Mute Volume Down Volume Up Play/Pause Stop Previous track Next track Calculator Computer Email Home/Browser
iOne (Func KB-460, QPad MK-50 etc.) Mute Volume Down Volume Up Play/Pause Previous track Next track
KeyCool 84, KeyCool 87 Computer Home/Browser Calculator Media Player Previous Track Next Track Play/Pause Stop Mute Volume Down Volume Up (Windows lock)
KeyCool 108 Computer Home/Browser Mail Media Player Previous Track Next Track Play/Pause Stop Mute Volume Down Volume Up (Windows lock) Lock Sleep, Calculator, ... ?
Matias Quiet Pro Mini (PC) Rewind (Previous track) Forward (Next track) Play/Pause on Esc, Mute Volume Up/Down on Fn-Arrow key
Max Keyboard Blackbird Mute Volume Down Volume Up Play/Pause Previous Track Next Track
Mionix Zibal 60 Mute Volume Down Volume Up Play/Pause Stop Previous Track Next Track
Noppoo Lolita My Computer Web Browser Calculator Media Player Previous Track Next Track Play/Pause (NKRO) Mute Volume Down Volume Up
Noppoo Lolita Spyder Previous Track Play/Pause Next Track Stop Mute Volume Down Volume Up
Plum 96 Mute Volume Down Volume Up Play/Pause Previous Track Next Track Home/Browser My computer (Debounce dec) (Debounce inc)
SteelSeries 6GV2 Mute Volume Down Volume Up Play/Pause Previous Track Next Track

Protocol

Media keys usually emit distinct codes to the host.

USB

In the USB HID ("Human Interface Device") standard, while most key codes are in the "Keyboard/Keypad" usage page (0x07), most most media keys are in "Consumer" usage page (0x0C). System control keys (Power, Sleep, Wake) are in the "Generic Desktop" usage page (0x01).

The "Consumer Usage Page" has also codes for linear relative values for volume control, bass and treble. While it may appear to be analogue, the knob or roller is usually connected to a rotary encoder. The values are relative to the volume level set by the user in the operating system and application software. If the controls had absolute values, they would have needed to be motorized and under computer control, which is something that the USB HID specification does not support.

The controls in each Usage Page are transmitted in a separate packet. Therefore, media keys may have separate rollover characteristics from regular keys.

PS/2

For PS/2, Microsoft has standardized media key scancodes for Windows.

Some vendors have used their own codes that have been activated first after having received a "magic" code from the host's keyboard driver.

References