From 84cd668bb66ce8958124d60444623542a0cc5836 Mon Sep 17 00:00:00 2001 From: Glenn Watson Date: Mon, 27 Oct 2014 14:38:44 +1000 Subject: Add backspace event and map some more keys on x11. --- src/x11/window/events.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/x11/window') 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 { 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 { 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 { //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 { //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 { //ffi::XK_Hebrew_switch => events::Hebrew_switch, _ => return None }) -} \ No newline at end of file +} -- cgit v1.2.3