cappuccino / cappuccino

Web Application Framework in JavaScript and Objective-J
https://cappuccino.dev/
GNU Lesser General Public License v2.1
2.2k stars 333 forks source link

The key å and Å is lost or misplaced when typing in CPTextView #3030

Closed mrcarlberg closed 2 years ago

mrcarlberg commented 2 years ago

We have problems with CPTextView and the Scandinavian character Å and å. When typing fast the text view will loose or misplace it. This makes CPTextView unusable for us. There is some special handling with it as browser has some old weird handling for dead keys. ("https://stackoverflow.com/questions/25043934/is-it-ok-to-ignore-keydown-events-with-keycode-229"). I did some quick check in the code and the CPTextView uses some global variables for handling this (´_CPNativeInputFieldKeyDownCalled´ and friends). It does not work when you type fast as multiple keydowns will come in a row and probably the global variables will be overwritten? This can be tested by setting the keyboard layout to a Scandinavian layout and type å or Å (the key directly to the right of P). It does work if you type very slow.

Scandinavian keyboard layout: image

cappbot commented 2 years ago

Milestone: Someday. Label: #new. What's next? A reviewer should examine this issue.

mrcarlberg commented 2 years ago

I have found three things that is strange.

  1. When typing fast and includes å or Å, some of them will be lost.
  2. When typing "åp" you get "påp" instead.
  3. Hold down å or Å, wait for some seconds and release the key. The repeated keys will not appear when the key is pressed. They all appear when the key is released.
daboe01 commented 2 years ago

-#new +TextView

cappbot commented 2 years ago

Milestone: Someday. Label: TextView. What's next? A reviewer should examine this issue.