Переглянути джерело

LibKeyboard: don't null codepoint for numpad return key

Sergey Semushin 4 роки тому
батько
коміт
277fc41f47
1 змінених файлів з 2 додано та 2 видалено
  1. 2 2
      Libraries/LibKeyboard/CharacterMap.cpp

+ 2 - 2
Libraries/LibKeyboard/CharacterMap.cpp

@@ -84,8 +84,8 @@ u32 CharacterMap::get_char(KeyEvent event)
     if (event.e0_prefix && event.key == Key_Slash) {
     if (event.e0_prefix && event.key == Key_Slash) {
         // If Key_Slash (scancode = 0x35) mapped to other form "/", we fix num pad key of "/" with this case.
         // If Key_Slash (scancode = 0x35) mapped to other form "/", we fix num pad key of "/" with this case.
         code_point = '/';
         code_point = '/';
-    } else if (event.e0_prefix) {
-        // Except for `keypad-/`, all e0 scan codes are not actually characters. i.e., `keypad-0` and
+    } else if (event.e0_prefix && event.key != Key_Return) {
+        // Except for `keypad-/` and 'keypad-return', all e0 scan codes are not actually characters. i.e., `keypad-0` and
         // `Insert` have the same scancode except for the prefix, but insert should not have a code_point.
         // `Insert` have the same scancode except for the prefix, but insert should not have a code_point.
         code_point = 0;
         code_point = 0;
     }
     }