diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2014-10-27 07:43:02 +0100 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2014-10-27 07:43:02 +0100 |
commit | 60e9ba4febf32d2f3406b44b5e1d22396a29ff6d (patch) | |
tree | 19f0ef7919f167ced6a0cef001803dd5ff98af7e /src/x11/window | |
parent | 391c42d17701d2cb30c71475d406bfa208d46e4a (diff) | |
parent | 84cd668bb66ce8958124d60444623542a0cc5836 (diff) | |
download | glutin-60e9ba4febf32d2f3406b44b5e1d22396a29ff6d.tar.gz glutin-60e9ba4febf32d2f3406b44b5e1d22396a29ff6d.zip |
Merge pull request #74 from glennw/x11-key-events
Add backspace event and map some more keys on x11.
Diffstat (limited to 'src/x11/window')
-rw-r--r-- | src/x11/window/events.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/x11/window/events.rs b/src/x11/window/events.rs index 4d74eed..bf91e6a 100644 --- a/src/x11/window/events.rs +++ b/src/x11/window/events.rs @@ -4,7 +4,7 @@ use VirtualKeyCode; pub fn keycode_to_element(scancode: libc::c_uint) -> Option<VirtualKeyCode> { Some(match scancode { - //ffi::XK_BackSpace => events::Backspace, + ffi::XK_BackSpace => events::Back, ffi::XK_Tab => events::Tab, //ffi::XK_Linefeed => events::Linefeed, //ffi::XK_Clear => events::Clear, @@ -38,9 +38,9 @@ pub fn keycode_to_element(scancode: libc::c_uint) -> Option<VirtualKeyCode> { ffi::XK_Right => events::Right, ffi::XK_Down => events::Down, //ffi::XK_Prior => events::Prior, - //ffi::XK_Page_Up => events::Page_up, + ffi::XK_Page_Up => events::PageUp, //ffi::XK_Next => events::Next, - //ffi::XK_Page_Down => events::Page_down, + ffi::XK_Page_Down => events::PageDown, //ffi::XK_End => events::End, //ffi::XK_Begin => events::Begin, //ffi::XK_Win_L => events::Win_l, @@ -185,7 +185,7 @@ pub fn keycode_to_element(scancode: libc::c_uint) -> Option<VirtualKeyCode> { //ffi::XK_asterisk => events::Asterisk, //ffi::XK_plus => events::Plus, //ffi::XK_comma => events::Comma, - //ffi::XK_minus => events::Minus, + ffi::XK_minus => events::Minus, //ffi::XK_period => events::Period, //ffi::XK_slash => events::Slash, //ffi::XK_0 => events::0, @@ -201,7 +201,7 @@ pub fn keycode_to_element(scancode: libc::c_uint) -> Option<VirtualKeyCode> { //ffi::XK_colon => events::Colon, //ffi::XK_semicolon => events::Semicolon, //ffi::XK_less => events::Less, - //ffi::XK_equal => events::Equal, + ffi::XK_equal => events::Equals, //ffi::XK_greater => events::Greater, //ffi::XK_question => events::Question, //ffi::XK_at => events::At, @@ -999,4 +999,4 @@ pub fn keycode_to_element(scancode: libc::c_uint) -> Option<VirtualKeyCode> { //ffi::XK_Hebrew_switch => events::Hebrew_switch, _ => return None }) -}
\ No newline at end of file +} |