Skip to content

Commit

Permalink
Comment fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
beldenfox committed Feb 20, 2024
1 parent 07ff8fa commit 6de7864
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static std::map<jint, guint32> robot_java_to_keyval;
// As the user types we build a map from character to Java KeyCode. We use
// this map in getKeyCodeForChar which ensures we only reference keys that
// are on the user's keyboard. GDK calls that query the GdkKeymap are slow
// (they scan all the maps each time) and can target keys not present on the
// (they scan all the maps each time) and can return keys not present on the
// keyboard.
static std::map<guint32, jint> char_to_java_code;

Expand Down Expand Up @@ -519,7 +519,8 @@ JNIEXPORT jint JNICALL Java_com_sun_glass_ui_gtk_GtkApplication__1getKeyCodeForC

// If we don't find the character in the map fall back to the old logic
// for compatibility. It is incorrect because it ignores the keyboard
// layout but it can handle characters like tab and space.
// layout but it can handle characters like space and A-Z on Latin
// layouts.
guint keyval = gdk_unicode_to_keyval(*ucs_char);

if (keyval == (*ucs_char | 0x01000000)) {
Expand Down

0 comments on commit 6de7864

Please sign in to comment.