From 019984a14f01e4463ae479765d2340ff26055367 Mon Sep 17 00:00:00 2001 From: michi_cc Date: Mon, 5 Aug 2013 20:36:36 +0000 Subject: (svn r25671) -Codechange: Pass character and key code separately to the keyboard handler. --- src/window.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/window.cpp') diff --git a/src/window.cpp b/src/window.cpp index bf51fd7ad..93a84812c 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -2448,18 +2448,15 @@ EventState Window::HandleEditBoxKey(int wid, WChar key, uint16 keycode) /** * Handle keyboard input. - * @param raw_key Lower 8 bits contain the ASCII character, the higher 16 bits the keycode + * @param keycode Virtual keycode of the key. + * @param key Unicode character of the key. */ -void HandleKeypress(uint32 raw_key) +void HandleKeypress(uint keycode, WChar key) { /* World generation is multithreaded and messes with companies. * But there is no company related window open anyway, so _current_company is not used. */ assert(HasModalProgress() || IsLocalCompany()); - /* Setup event */ - uint16 key = GB(raw_key, 0, 16); - uint16 keycode = GB(raw_key, 16, 16); - /* * The Unicode standard defines an area called the private use area. Code points in this * area are reserved for private use and thus not portable between systems. For instance, -- cgit v1.2.3-70-g09d2