Skip to content

Keyboard layout issue: Turkish keyboard . key triggers \frac{}{} shortcut instead of decimal point #2967

@kdemirel

Description

@kdemirel

I found a keyboard-layout-related issue while using MathLive.

In MathLive, the / key is mapped as a shortcut for \frac{}{}. On a Turkish keyboard layout, however, the physical key in the same position produces a . instead of /.

Because of this, when a user tries to type a decimal number such as 2.5, pressing the key for . after 2 is interpreted as if / had been pressed on an English keyboard. As a result, MathLive inserts:

\frac{2}{\placeholder{}}

instead of:

2.5

This seems to happen because the shortcut is tied to the physical key position rather than the actual character produced by the active keyboard layout.

A workaround is to explicitly define a shortcut so that pressing the . key inserts a literal dot. However, this may not be a robust solution, since similar problems could occur with other non-English keyboard layouts where the same physical key produces a different character.

Expected behavior:
When using a Turkish keyboard layout, pressing the key that produces . should insert a decimal point, not trigger the fraction shortcut.

Actual behavior:
Pressing the . key on a Turkish keyboard triggers the / shortcut behavior and inserts \frac{}{}.

Why this matters:
This makes it difficult to enter decimal numbers naturally in locales that use keyboard layouts different from English.

Suggested direction:
It may be better to resolve shortcuts based on the actual input character generated by the active keyboard layout, rather than the physical key position alone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions