Skip to content

Commit

Permalink
Merge pull request OpenTabletDriver#1757 from Shingyx/windows_media_keys
Browse files Browse the repository at this point in the history
Add Windows media key support
  • Loading branch information
InfinityGhost authored Jun 12, 2022
2 parents 3998e8a + 05fe0ff commit 325c28c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,13 @@ public void Release(IEnumerable<string> keys)
{ "Alt", VirtualKey.VK_MENU },
{ "Control", VirtualKey.VK_CONTROL },
{ "Application", VirtualKey.VK_LWIN },
{ "Mute", VirtualKey.VK_VOLUME_MUTE },
{ "VolumeDown", VirtualKey.VK_VOLUME_DOWN },
{ "VolumeUp", VirtualKey.VK_VOLUME_UP },
{ "Play/Pause", VirtualKey.VK_MEDIA_PLAY_PAUSE },
{ "Stop", VirtualKey.VK_MEDIA_STOP },
{ "PreviousTrack", VirtualKey.VK_MEDIA_PREV_TRACK },
{ "NextTrack", VirtualKey.VK_MEDIA_NEXT_TRACK },
};
}
}
9 changes: 7 additions & 2 deletions OpenTabletDriver.Native/Windows/Input/VK.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,13 @@ public enum VirtualKey : short
VK_LMENU = 0xA4,
VK_RMENU = 0xA5,
VK_BROWSER = 0xA6,
VK_VOLUME = 0xAD,
VK_MEDIA = 0xB0,
VK_VOLUME_MUTE = 0xAD,
VK_VOLUME_DOWN = 0xAE,
VK_VOLUME_UP = 0xAF,
VK_MEDIA_NEXT_TRACK = 0xB0,
VK_MEDIA_PREV_TRACK = 0xB1,
VK_MEDIA_STOP = 0xB2,
VK_MEDIA_PLAY_PAUSE = 0xB3,
VK_LAUNCH = 0xB4,
VK_GAMEPAD = 0xC3,
VK_ICO = 0xE3,
Expand Down

0 comments on commit 325c28c

Please sign in to comment.