Persian keyboard percent key types nothing in Perseus math answer fields

Open
#16,092 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript
Domain
frontend

Research direction

Start with packages/kolibri-common/composables/useKeypad.js, where KEYPAD_KEYS maps keyboard characters to keypad actions; the issue points to the relevant lines. Check nearby tests for keypad input and add coverage for ٪ (U+066A). Done means typing it in a Perseus math answer field inserts a percent sign, stores \%, and the unit test passes.

Written by the indexing model from the issue text.

Description

bug DEV: renderers

❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Target branch: release-v0.20.x

Observed behavior

  • In a Perseus numeric-input or input-number field, pressing ٪ (U+066A, Shift+5 on the Persian keyboard layout) inserts nothing.
  • KEYPAD_KEYS in useKeypad.js maps only ASCII % to PERCENT; it already maps Persian ٫ to DECIMAL.

Expected behavior

  • ٪ inserts a percent sign, as % does.

User-facing consequences

  • Learners on a Persian keyboard cannot type a percent answer from the keyboard; they must switch layout or use the on-screen keypad's % key.

Steps to reproduce

  1. Open /en/viewer_sandbox/ signed in as a superuser, set Content language to فارسی (fa).
  2. Paste an item with a numeric-input widget into Item JSON.
  3. Focus the field in Preview and type ۴۵٪ with a Persian keyboard layout.
  4. The field shows ۴۵; Answer state shows {"currentValue":"45"}.

Context

  • Kolibri release-v0.20.x at e3b074b70f, Chromium 159, Linux.
  • A key the fix for #15636 (closed; physical keys should insert what the matching on-screen key inserts) missed.
  • #15968 (for #15802) edits the same KEYPAD_KEYS lookup.

Acceptance Criteria

  • Typing ٪ in a Perseus math answer field inserts a percent sign and stores \%.
  • A unit test covers the ٪ key.

AI usage

Claude Code found this during manual QA of the Perseus numeral-normalization branch and drafted this issue.

Dominant language
Python
Stars
1.2k
Forks
1.1k
Avg merge
2d 9h
Merged PRs (30d)
87

Getting set up

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 learningequality/kolibri

All issues in learningequality/kolibri

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.