aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/x11
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2016-03-17 12:45:58 +0100
committertomaka <pierre.krieger1708@gmail.com>2016-03-17 12:45:58 +0100
commit45d25471c381fac929e93c37175007209a7feb33 (patch)
treeebc8e020e6c1e6f62f5990bbc891cbbbf28a3eff /src/api/x11
parenta3543b700f4982a470037cd059928aed533b887c (diff)
parent1de66e4efbd428e5cefa422e6c771e225cab1829 (diff)
downloadglutin-45d25471c381fac929e93c37175007209a7feb33.tar.gz
glutin-45d25471c381fac929e93c37175007209a7feb33.zip
Merge pull request #730 from Manishearth/nav
Add support for navigation keys
Diffstat (limited to 'src/api/x11')
-rw-r--r--src/api/x11/events.rs3
1 files changed, 3 insertions, 0 deletions
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
})
}