aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2016-03-24 19:56:55 +0100
committertomaka <pierre.krieger1708@gmail.com>2016-03-24 19:56:55 +0100
commit8ae2df68e19ca71453af5e11de9ca807ef7adcb4 (patch)
tree2292520b6ef5c72fbc6a11374761c0a6785912a1
parent0cf1f01990b97150773bb6d27172c7d2401ccb3c (diff)
parent9e2a179daaa9f61b80733f1c0739b203a4bbaa8c (diff)
downloadglutin-8ae2df68e19ca71453af5e11de9ca807ef7adcb4.zip
glutin-8ae2df68e19ca71453af5e11de9ca807ef7adcb4.tar.gz
Merge pull request #744 from adamncasey/patch-1
Enable more Windows keys
-rw-r--r--src/api/win32/event.rs62
1 files changed, 28 insertions, 34 deletions
diff --git a/src/api/win32/event.rs b/src/api/win32/event.rs
index c4946bb..a4de750 100644
--- a/src/api/win32/event.rs
+++ b/src/api/win32/event.rs
@@ -42,7 +42,7 @@ pub fn vkeycode_to_element(wparam: winapi::WPARAM, lparam: winapi::LPARAM) -> (S
winapi::VK_KANJI => Some(VirtualKeyCode::Kanji),
winapi::VK_ESCAPE => Some(VirtualKeyCode::Escape),
winapi::VK_CONVERT => Some(VirtualKeyCode::Convert),
- //winapi::VK_NONCONVERT => Some(VirtualKeyCode::Nonconvert),
+ winapi::VK_NONCONVERT => Some(VirtualKeyCode::NoConvert),
//winapi::VK_ACCEPT => Some(VirtualKeyCode::Accept),
//winapi::VK_MODECHANGE => Some(VirtualKeyCode::Modechange),
winapi::VK_SPACE => Some(VirtualKeyCode::Space),
@@ -143,44 +143,38 @@ pub fn vkeycode_to_element(wparam: winapi::WPARAM, lparam: winapi::LPARAM) -> (S
winapi::VK_F24 => Some(VirtualKeyCode::F24),*/
winapi::VK_NUMLOCK => Some(VirtualKeyCode::Numlock),
winapi::VK_SCROLL => Some(VirtualKeyCode::Scroll),
- /*winapi::VK_LSHIFT => Some(VirtualKeyCode::Lshift),
- winapi::VK_RSHIFT => Some(VirtualKeyCode::Rshift),
- winapi::VK_LCONTROL => Some(VirtualKeyCode::Lcontrol),
- winapi::VK_RCONTROL => Some(VirtualKeyCode::Rcontrol),
- winapi::VK_LMENU => Some(VirtualKeyCode::Lmenu),
- winapi::VK_RMENU => Some(VirtualKeyCode::Rmenu),*/
winapi::VK_BROWSER_BACK => Some(VirtualKeyCode::NavigateBackward),
winapi::VK_BROWSER_FORWARD => Some(VirtualKeyCode::NavigateForward),
- /*winapi::VK_BROWSER_REFRESH => Some(VirtualKeyCode::Browser_refresh),
- winapi::VK_BROWSER_STOP => Some(VirtualKeyCode::Browser_stop),
- winapi::VK_BROWSER_SEARCH => Some(VirtualKeyCode::Browser_search),
- winapi::VK_BROWSER_FAVORITES => Some(VirtualKeyCode::Browser_favorites),
- winapi::VK_BROWSER_HOME => Some(VirtualKeyCode::Browser_home),
- winapi::VK_VOLUME_MUTE => Some(VirtualKeyCode::Volume_mute),
- winapi::VK_VOLUME_DOWN => Some(VirtualKeyCode::Volume_down),
- winapi::VK_VOLUME_UP => Some(VirtualKeyCode::Volume_up),
- winapi::VK_MEDIA_NEXT_TRACK => Some(VirtualKeyCode::Media_next_track),
- winapi::VK_MEDIA_PREV_TRACK => Some(VirtualKeyCode::Media_prev_track),
- winapi::VK_MEDIA_STOP => Some(VirtualKeyCode::Media_stop),
- winapi::VK_MEDIA_PLAY_PAUSE => Some(VirtualKeyCode::Media_play_pause),
- winapi::VK_LAUNCH_MAIL => Some(VirtualKeyCode::Launch_mail),
- winapi::VK_LAUNCH_MEDIA_SELECT => Some(VirtualKeyCode::Launch_media_select),
- winapi::VK_LAUNCH_APP1 => Some(VirtualKeyCode::Launch_app1),
- winapi::VK_LAUNCH_APP2 => Some(VirtualKeyCode::Launch_app2),
- winapi::VK_OEM_1 => Some(VirtualKeyCode::Oem_1),*/
- winapi::VK_OEM_PLUS => Some(VirtualKeyCode::Add),
+ winapi::VK_BROWSER_REFRESH => Some(VirtualKeyCode::WebRefresh),
+ winapi::VK_BROWSER_STOP => Some(VirtualKeyCode::WebStop),
+ winapi::VK_BROWSER_SEARCH => Some(VirtualKeyCode::WebSearch),
+ winapi::VK_BROWSER_FAVORITES => Some(VirtualKeyCode::WebFavorites),
+ winapi::VK_BROWSER_HOME => Some(VirtualKeyCode::WebHome),
+ winapi::VK_VOLUME_MUTE => Some(VirtualKeyCode::Mute),
+ winapi::VK_VOLUME_DOWN => Some(VirtualKeyCode::VolumeDown),
+ winapi::VK_VOLUME_UP => Some(VirtualKeyCode::VolumeUp),
+ winapi::VK_MEDIA_NEXT_TRACK => Some(VirtualKeyCode::NextTrack),
+ winapi::VK_MEDIA_PREV_TRACK => Some(VirtualKeyCode::PrevTrack),
+ winapi::VK_MEDIA_STOP => Some(VirtualKeyCode::MediaStop),
+ winapi::VK_MEDIA_PLAY_PAUSE => Some(VirtualKeyCode::PlayPause),
+ winapi::VK_LAUNCH_MAIL => Some(VirtualKeyCode::Mail),
+ winapi::VK_LAUNCH_MEDIA_SELECT => Some(VirtualKeyCode::MediaSelect),
+ /*winapi::VK_LAUNCH_APP1 => Some(VirtualKeyCode::Launch_app1),
+ winapi::VK_LAUNCH_APP2 => Some(VirtualKeyCode::Launch_app2),*/
+ winapi::VK_OEM_PLUS => Some(VirtualKeyCode::Equals),
winapi::VK_OEM_COMMA => Some(VirtualKeyCode::Comma),
winapi::VK_OEM_MINUS => Some(VirtualKeyCode::Minus),
winapi::VK_OEM_PERIOD => Some(VirtualKeyCode::Period),
- /*winapi::VK_OEM_2 => Some(VirtualKeyCode::Oem_2),
- winapi::VK_OEM_3 => Some(VirtualKeyCode::Oem_3),
- winapi::VK_OEM_4 => Some(VirtualKeyCode::Oem_4),
- winapi::VK_OEM_5 => Some(VirtualKeyCode::Oem_5),
- winapi::VK_OEM_6 => Some(VirtualKeyCode::Oem_6),
- winapi::VK_OEM_7 => Some(VirtualKeyCode::Oem_7),
- winapi::VK_OEM_8 => Some(VirtualKeyCode::Oem_8),
- winapi::VK_OEM_102 => Some(VirtualKeyCode::Oem_102),
- winapi::VK_PROCESSKEY => Some(VirtualKeyCode::Processkey),
+ /*winapi::VK_OEM_1 => Some(VirtualKeyCode::Oem_1),
+ winapi::VK_OEM_2 => Some(VirtualKeyCode::Oem_2),
+ winapi::VK_OEM_3 => Some(VirtualKeyCode::Oem_3),
+ winapi::VK_OEM_4 => Some(VirtualKeyCode::Oem_4),
+ winapi::VK_OEM_5 => Some(VirtualKeyCode::Oem_5),
+ winapi::VK_OEM_6 => Some(VirtualKeyCode::Oem_6),
+ winapi::VK_OEM_7 => Some(VirtualKeyCode::Oem_7),
+ winapi::VK_OEM_8 => Some(VirtualKeyCode::Oem_8), */
+ winapi::VK_OEM_102 => Some(VirtualKeyCode::OEM102),
+ /*winapi::VK_PROCESSKEY => Some(VirtualKeyCode::Processkey),
winapi::VK_PACKET => Some(VirtualKeyCode::Packet),
winapi::VK_ATTN => Some(VirtualKeyCode::Attn),
winapi::VK_CRSEL => Some(VirtualKeyCode::Crsel),