Skip to content

Commit

Permalink
Merge pull request #5282 from database-client-lib/fix-unexpected-comp…
Browse files Browse the repository at this point in the history
…osition

Fixed CapsLock triggering input twice in MacOS.
  • Loading branch information
Tyriar authored Jan 8, 2025
2 parents 66780c0 + 0433fb8 commit c21f32d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/browser/input/CompositionHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ export class CompositionHelper {
*/
public keydown(ev: KeyboardEvent): boolean {
if (this._isComposing || this._isSendingComposition) {
if (ev.keyCode === 229) {
if (ev.keyCode === 20 || ev.keyCode === 229) {
// 20 is CapsLock, 229 is Enter
// Continue composing if the keyCode is the "composition character"
return false;
}
Expand Down

0 comments on commit c21f32d

Please sign in to comment.