Store the keycode rather than raw key

This commit is contained in:
Baptiste Wicht 2016-08-18 17:46:28 +02:00
parent 2b941a95ad
commit 951b0a656c
2 changed files with 3 additions and 2 deletions

View File

@ -306,7 +306,7 @@ char keyboard::shift_key_to_ascii(uint8_t key){
return shifted_qwertz[key];
}
keycode raw_key_to_keycode(uint8_t key){
keycode keyboard::raw_key_to_keycode(uint8_t key){
if(key & 0x80){
key &= ~(0x80);
return released_codes[key];

View File

@ -72,7 +72,8 @@ void stdio::virtual_terminal::send_input(char key){
} else {
// The complete processing of the key will be done by the
// userspace program
raw_buffer.push(key);
auto code = keyboard::raw_key_to_keycode(key);
raw_buffer.push(static_cast<size_t>(code));
if(!input_queue.empty()){
input_queue.wake_up();