[iOS, Bluetooth keyboard] { and } movement doesn't work

Open
#243 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
frontend, mobile

Research direction

Start with dev/web-demo.html and trace the keyboard-event handling for the reported iOS Safari sequence, especially { and } with AltGr or other modifiers. Reproduce it using a French Bluetooth keyboard on iOS 18.6 and compare with the working Firefox behavior; done means both movement keys move the cursor in normal mode instead of inserting characters.

Written by the indexing model from the issue text.

Description

On a French Bluetooth keyboard on iOS (18.6), the { and } movement keys (in normal mode) do not move the cursor as normal, but instead insert the corresponding character.

I observe this problem in (iOS) Safari on the test site. As a point of comparison, doing the same does work in Firefox on Windows 11 (on a French keyboard, too, where } involves AltGr).

Here is the sequence printed by the site (for iOS in Safari):

164 text
163 keypress } Minus
162 handleKey <A-}>
161 keydown } Minus
160 handleKey
159 keydown Alt AltLeft
158 keypress Escape Escape

Maybe this is part of a more general issue with handling (non-US?) external keyboards and characters with dead/modifier keys in normal mode? The following were fixed, in the past, for instance:

  1. https://github.com/replit/codemirror-vim/issues/125
  2. https://github.com/replit/codemirror-vim/issues/91

Thanks!

Dominant language
JavaScript
Stars
470
Forks
53
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from replit/codemirror-vim

All issues in replit/codemirror-vim

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.