diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/api/win32/event.rs | 8 | ||||
-rw-r--r-- | src/api/x11/events.rs | 3 | ||||
-rw-r--r-- | src/events.rs | 2 |
3 files changed, 9 insertions, 4 deletions
diff --git a/src/api/win32/event.rs b/src/api/win32/event.rs index ad4598a..f60ec7e 100644 --- a/src/api/win32/event.rs +++ b/src/api/win32/event.rs @@ -148,10 +148,10 @@ pub fn vkeycode_to_element(wparam: winapi::WPARAM, lparam: winapi::LPARAM) -> (S 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::Browser_back), - winapi::VK_BROWSER_FORWARD => Some(VirtualKeyCode::Browser_forward), - winapi::VK_BROWSER_REFRESH => Some(VirtualKeyCode::Browser_refresh), + 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), diff --git a/src/api/x11/events.rs b/src/api/x11/events.rs index 408a3ec..d497319 100644 --- a/src/api/x11/events.rs +++ b/src/api/x11/events.rs @@ -3,6 +3,7 @@ use super::ffi; use VirtualKeyCode; pub fn keycode_to_element(scancode: libc::c_uint) -> Option<VirtualKeyCode> { + println!("{:?}", scancode); Some(match scancode { ffi::XK_BackSpace => events::VirtualKeyCode::Back, ffi::XK_Tab => events::VirtualKeyCode::Tab, @@ -997,6 +998,8 @@ pub fn keycode_to_element(scancode: libc::c_uint) -> Option<VirtualKeyCode> { //ffi::XK_hebrew_taw => events::VirtualKeyCode::Hebrew_taw, //ffi::XK_hebrew_taf => events::VirtualKeyCode::Hebrew_taf, //ffi::XK_Hebrew_switch => events::VirtualKeyCode::Hebrew_switch, + ffi::XF86XK_Back => VirtualKeyCode::NavigateBackward, + ffi::XF86XK_Forward => VirtualKeyCode::NavigateForward, _ => return None }) } diff --git a/src/events.rs b/src/events.rs index 8049c16..9fff1fb 100644 --- a/src/events.rs +++ b/src/events.rs @@ -264,6 +264,8 @@ pub enum VirtualKeyCode { Multiply, Mute, MyComputer, + NavigateForward, // also called "Prior" + NavigateBackward, // also called "Next" NextTrack, NoConvert, NumpadComma, |