Browse Source

Merge pull request #62633 from linkpy/61508_fix

Rémi Verschelde 3 years ago
parent
commit
0b5b39d536
1 changed files with 8 additions and 1 deletions
  1. 8 1
      core/os/input_event.cpp

+ 8 - 1
core/os/input_event.cpp

@@ -268,7 +268,14 @@ uint32_t InputEventKey::get_physical_scancode_with_modifiers() const {
 }
 
 String InputEventKey::as_text() const {
-	String kc = keycode_get_string(scancode);
+	String kc;
+
+	if (scancode == 0) {
+		kc = keycode_get_string(physical_scancode) + " (" + RTR("Physical") + ")";
+	} else {
+		kc = keycode_get_string(scancode);
+	}
+
 	if (kc == String()) {
 		return kc;
 	}