Questions tagged [media-keys]

Anything related to media-keys, i.e. special keys found on some kind of keyboards and used to start or control media-related, or sometimes internet-related, applications. For example keys used to increase/decrease the music volume, skip a song or start the internet browser.

Anything related to media-keys, i.e. special keys found on some kind of keyboards and used to start or control media-related, or sometimes internet-related, applications. For example keys used to increase/decrease the music volume, skip a song or start the internet browser.

17 questions
8
votes
4 answers

How to emulate pressing media keys in Java?

How can I emulate pressing media keys in Java? Such as play/pause, next/previous, volume control. C# has VK_MEDIA_PLAY_PAUSE, VK_MEDIA_NEXT_TRACK and so on. Java has class Robot for working with keys, but there are no media keys.
just_user
  • 91
  • 1
  • 2
6
votes
2 answers

Can Chrome "packaged apps" respond to global keyboard commands?

I've recently switched from Spotify to Google Music, but miss having a desktop client that responds to keyboard commands. In particular, my laptop has media keys and my fingers keep going to them out of muscle memory. To remedy this (and other…
Tom Wright
  • 11,278
  • 15
  • 74
  • 148
5
votes
1 answer

Global keyhook for mediakeys in C#

With the following RegisterHotKey function, I can globally hook normal key-modifier combinations: [DllImport("user32.dll")] private static extern bool RegisterHotKey(IntPtr hWnd, int id, uint fsModifiers, uint vk); Great article about it and full…
darx
  • 1,417
  • 1
  • 11
  • 25
4
votes
3 answers

KeyEvent special Keys (like mute)

I'm currently trying to create a little remote-app for Android to control a MediaPlayer (like Rythmbox) on my PC. Most media-players understand the special keys on my keyboard (like "play/pause" or "next/previous"). My idea is that the Android App…
Lukas Knuth
  • 25,449
  • 15
  • 83
  • 111
2
votes
1 answer

How to consume media key presses and volume changes in a WPF Application?

I have a WPF application that is supposed to react to media keys and a volume knob I have connected to the computer. This was straightforward using WPF commands: MainWindow.xaml:
Sacchan
  • 377
  • 3
  • 9
2
votes
1 answer

Media Keys of MX Keys Not Working After Installing Logitech Options

I recently purchased this MX Keys and MX Master combo and was excited to use the keyboard to its full potential but the media keys is not working after I installed the Logitech options software. There is not much research available about it online.…
2
votes
1 answer

Can Autohotkey Remap Media Key Combos?

I want to use the 4 buttons above the numpad for data entry, with the "calc" button as a sort of modifier, so I can do multiple things with them. I'm having trouble making key combos work. Here are a few different versions of the code I've tried, to…
Dylan Kinnett
  • 241
  • 3
  • 15
1
vote
1 answer

Finding Bluetooth key event code on raspberry pi

im on raperry pi 3b running defult 32bit os. Im trying to record the bluetooth inputs from my headset similar to the read command.to bind that code i get from that to another command to do stuff like pausing and playing music with playerctl. i tried…
Amir Ahmed
  • 13
  • 2
1
vote
1 answer

Simulate Media-Key press in MacOS

I would like to simulate media keypresses from within an app on Mac OS. I am using Swift in Xcode 10 on Mojave 10.14.4 Using answers such as Simulate keypress using Swift I can simulate a variety of keys, but not the media transport keys…
the quantity
  • 126
  • 1
  • 6
1
vote
1 answer

DirectX window media keys not responding

Im making a game with a custom game engine and when you have selected the window that it creates it doesn't allow you to use media keys e.g. changing volume or playing/pausing music or anything that has to do with windows like getting the windows…
1
vote
1 answer

CGEventTapCreate and CFMachPortCreateRunLoopSource fails EXC_BAD_ACCESS

I am trying to tap into the HID events of OSX. I found a snippet for testing it. However my code always seem to fail with EXC_BAD_ACCESS at the CFMachPortCreateRunLoopSource line. It seems that downEventTap is null. Reading the documentation tells…
David Karlsson
  • 9,396
  • 9
  • 58
  • 103
0
votes
1 answer

Web Audio Session API to trigger method calls in app rather than playing media

I'm having a hard time getting the Web Audio API to do what I want. My goal is to eventually trigger voice recognition in a PWA on mobile, but first I decided to do a test case of incrementing a counter whenever play or pause was pressed. I am using…
Joel Nash
  • 21
  • 1
  • 10
0
votes
0 answers

How to capture event from apple remote?

I want to capture events from an apple remote in a macOS App. I tried to use EventTap to capture CGEvent from the system and found it do send an event. Then I turn it into NSEvent, then found the data1 and data2 of all buttons are all the same. I'm…
Jinyu Meng
  • 321
  • 2
  • 13
0
votes
1 answer

Media keys in WndProc not firing

I am creating a media player in WinForms, C#. I want to respond to the user pressing the multimedia keys on the keyboard using the following code that can be found all over the internet: public const int WM_APPCOMMAND = 0x0319; protected override…
Jonas Kohl
  • 1,018
  • 1
  • 11
  • 28
1
2