This commit is contained in:
neviyn 2016-08-17 14:10:27 +01:00
commit 49c1dd6cb6

View File

@ -295,10 +295,10 @@ public class PlayerGUI extends JPanel implements PlayerCallbackInterface {
private class GlobalKeyboardShortcuts implements NativeKeyListener { private class GlobalKeyboardShortcuts implements NativeKeyListener {
boolean modified = false; boolean modified = false;
final int playPause = 192; final char playPause = '\'';
final int stop = 222; final char stop = '#';
final int previous = 219; final char previous = '[';
final int next = 221; final char next = ']';
@Override @Override
public void nativeKeyPressed(NativeKeyEvent nativeKeyEvent) { public void nativeKeyPressed(NativeKeyEvent nativeKeyEvent) {
@ -316,7 +316,7 @@ public class PlayerGUI extends JPanel implements PlayerCallbackInterface {
public void nativeKeyTyped(NativeKeyEvent nativeKeyEvent) { public void nativeKeyTyped(NativeKeyEvent nativeKeyEvent) {
if (modified) { if (modified) {
try { try {
switch (nativeKeyEvent.getRawCode()) { switch (nativeKeyEvent.getKeyChar()) {
case playPause: case playPause:
if (player.isPlaying()) { if (player.isPlaying()) {
player.pause(); player.pause();