media-keys

How to emulate pressing media keys in Java?

拥有回忆 提交于 2019-12-12 07:26:52
问题 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. 回答1: I used the JNI Library to simulate the key presses using code written in C. I've created a .dll file and .java file for hitting the "Volume Down", "Volume Up", "Volume Mute", "Previous Track", "Next Track", and "Play/Pause Track" media keys. Here is a link to

How to emulate pressing media keys in Java?

久未见 提交于 2019-12-12 01:28:26
问题 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. 回答1: I used the JNI Library to simulate the key presses using code written in C. I've created a .dll file and .java file for hitting the "Volume Down", "Volume Up", "Volume Mute", "Previous Track", "Next Track", and "Play/Pause Track" media keys. Here is a link to

How to emulate pressing media keys in Java?

一曲冷凌霜 提交于 2019-12-01 05:23:24
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. I used the JNI Library to simulate the key presses using code written in C. I've created a .dll file and .java file for hitting the "Volume Down", "Volume Up", "Volume Mute", "Previous Track", "Next Track", and "Play/Pause Track" media keys. Here is a link to the full repository, however, I will explain it in more detail below. MediaKeys.java must be in a package

KeyEvent special Keys (like mute)

偶尔善良 提交于 2019-11-29 15:28:41
问题 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 sends a command (like "pause") to the PC. On the PC runs a normal Java-Application which receives this commands and simulates a key-press of this special button. The advantage would be that you can use this App on all platforms for every player