My keyboard has no "media" keys; can I control media without them?
My USB keyboard does not have "media" keys -- that is, dedicated keys for play, stop, next, prev, volume up/down, etcetera.
For the sake of this question, I would prefer not to install additional software if I can avoid it.
Is it possible to issue some standard key sequence on a generic USB keyboard that emulates these play, stop, etc. multimedia keys?
Like Ctrl+Alt+Shift+F12 or something obscure like that?
I'm pretty sure it's not possible to do what you want. Media keys don't send key combinations; instead, they have their own usage IDs in the HID. See this document (media keys are in the Consumer Page (0X0C)). If you want to simulate them using a key combo, you're going to have to do it in software.
Windows
AutoHotkey
AutoHotkey (AHK) is a free, open-source macro-creation and automation software for Windows that allows users to automate repetitive tasks. It is driven by a scripting language that was initially aimed at providing keyboard shortcuts, otherwise known as hotkeys, that over time evolved into a full-fledged scripting language.
http://ahkscript.org/
To learn about AHK I recommend checking its site, pages mentioned in Quick Reference and especially skimming at least AutoHotkey Beginner Tutorial. Don't forget to download, install and fiddle with it yourself. There is also helpful forum.
Example
In this case you should look particularly at following pages: Hotkeys (Mouse, Joystick and Keyboard Shortcuts), List of Keys, Mouse Buttons, and Joystick Controls and Send / SendRaw / SendInput / SendPlay / SendEvent: Send Keys & Clicks. Then you'll be able to assemble simple AHK script, e.g. something like:
^!Left::Send {Media_Prev} ^!Down::Send {Media_Play_Pause} ^!Right::Send {Media_Next} +^!Left::Send {Volume_Down} +^!Down::Send {Volume_Mute} +^!Right::Send {Volume_Up} ^!.:: MsgBox, 0, , Hello AHK world! return
Here you define following actions:
- Ctrl+Alt+← sends Previous
- Ctrl+Alt+↓ sends Play/Pause
- Ctrl+Alt+→ sends Next
- Ctrl+Shift+Alt+← sends Volume Down
- Ctrl+Shift+Alt+↓ sends Mute
- Ctrl+Shift+Alt+→ sends Volume Up
-
Ctrl+Alt+. invokes message box greeting AHK world (just to show non-oneline key-commands mapping ending w/
return
)
Usage
You create .ahk
file, paste above code in it (w/o useless MsgBox, of course), save and double click to run it. You'll get H icon in systray allowing you to interact w/ the script, particularly: suspend hotkeys, pause script (not useful here) or just exit it. For better convenience I suggest compiling such script. You can do it using Right Button Mouse on the file and choosing Compile Script. Then you'll get .exe
file (pretty big, but it's like complete autohotkey) that you can share w/ others or add to autostart for instance.
Remapping via the Registry's "Scancode Map" / KeyTweak
In AutoHotkey's Remapping Keys and Buttons page you can read about other way of assigning keys to keys, remapping. It may be not useful in your case (unless you're ready to "lose" some keys), but it's still worth reading. (Then you should figure out why I haven't used AHK remapping in my example.)
Let me quote it (w/o blockquote to preserve formatting) and fix some links along the way:
<quote>
Advantages
- Registry remapping is generally more pure and effective than AutoHotkey's remapping. For example, it works in a broader variety of games, it has no known alt-tab issues, and it is capable of firing AutoHotkey's hook hotkeys (whereas AutoHotkey's remapping requires a workaround).
- If you choose to make the registry entries manually (explained below), absolutely no external software is needed to remap your keyboard. Even if you use KeyTweak to make the registry entries for you, KeyTweak does not need to stay running all the time (unlike AutoHotkey).
Disadvantages
- Registry remapping is relatively permanent: a reboot is required to undo the changes or put new ones into effect.
- Its effect is global: it cannot create remappings specific to a particular user, application, or locale.
- It cannot send keystrokes that are modified by Shift, Control, Alt, or AltGr. For example, it cannot remap a lowercase character to an uppercase one.
- It supports only the keyboard (AutoHotkey has mouse remapping and some limited joystick remapping).
How to Apply Changes to the Registry
There are at least two methods to remap keys via the registry:
- Use a program like KeyTweak (freeware) to visually remap your keys. It will change the registry for you.
- Remap keys manually by creating a .reg file (plain text) and loading it into the registry. This is demonstrated at www.autohotkey.com/forum/post-56216.html#56216
</quote>
EventGhost
EventGhost is an advanced, easy to use and extensible automation tool for MS Windows. It can use different input devices like infrared or wireless remote controls to trigger macros, that on their part control a computer and its attached hardware. So it can be used to control a Media-PC with a normal consumer remote. But its possible uses go much beyond this.
http://www.eventghost.org/
Haven't tried it, but looks interesting and a bit related, so I think it's worth mentioning it here.
Some SuperUsers may remember Girder, that unfortunately stopped being freeware long time ago. EventGhost seems somewhat similar. I no longer have AverMedia's TVPhone98, but using remote via Girder was fun.
If you have some useless keys, (like scroll lock, or pause, or the key to invoke the contextual menu, or the windows key at the right side, or else) you can remap it to media keys.
Windows: with Sharpkeys.
Mac: with Karabiner
Another option (for laptops) is to setup your trackpad finger gestures in Windows 10.
Settings > Devices > Touchpad
This is how i set mine up since I don't have media keys.
Although this isn't exactly what was asked for, this solution is great since you don't need any extra software. Some might find it more convenient than a keyboard shortcut.
I don't blame you for not wanting to install extra software, but AutoHotKey is a program which lets you write scrips for key presses.
AutoHotkey is a free, open-source utility for Windows. With it, you can:
Automate almost anything by sending keystrokes and mouse clicks. You can write a mouse or keyboard macro by hand or use the macro recorder.
Create hotkeys for keyboard, joystick, and mouse. Virtually any key, button, or ombination can become a hotkey.
Expand abbreviations as you type them. For example, typing "btw" can automatically produce "by the way".
Create custom data-entry forms, user interfaces, and menu bars. See GUI for details.
Remap keys and buttons on your keyboard, joystick, and mouse.
Respond to signals from hand-held remote controls via the WinLIRC client script.
Run existing AutoIt v2 scripts and enhance them with new capabilities.
Convert any script into an EXE file that can be run on computers that don't have AutoHotkey installed.