arnog / mathlive

A web component for easy math input
https://cortexjs.io/mathlive
MIT License
1.26k stars 260 forks source link

On the virtual keyboard the } key does not return correctly #2417

Closed guillermomartinez closed 1 week ago

guillermomartinez commented 1 week ago

Description

https://github.com/arnog/mathlive/assets/5642429/e6894bc7-04c7-4fa6-b781-e9c24794b68f

Steps to Reproduce

(Required) Provide steps that are specific and repeatable

  1. I activate the virtual keyboard
  2. Enter the } key
  3. The value returned is ]

Actual Behavior

When I type the } key it returns ]

Expected Behavior

When I type the } key it should return }

Environment

MathLive version 0.100.0

Operating System macOS, Windows, iOS. Include the version Windows 10

Browser _Safari, Chrome, Edge, Firefox, etc... Try several browsers and note Chrome, Edge, Firefox

The problem is on this line https://github.com/arnog/mathlive/blob/master/src/virtual-keyboard/utils.ts#L898 { latex: '\\rbrace', key: ']' },

Should be { latex: '\\rbrace', key: '}' },

arnog commented 1 week ago

Thanks for reporting this and tracking down the issue. PRs are also gladly accepted!