You are browsing as a guest. Sign up (or log in) to start making projects!

9h 38m 25s logged

calc82: Devlog #12 7/09/2026

calc82: because calculators are for everyone

This devlog follows the addition of customisable and accessible keyboard bindings to my calculator.

🌟 New functionality summary

  • Settings menu
    • Switches between sidebar and popup dependent on screen width
  • Key rebinding
    • Flow of choosing button, then pressing key to rebind
    • Stores in local storage
  • Help hotkey
    • Shows all currently bound keys.

Key hint consideration

The default keyboard map has been implemented as a const dictionary for a while now, allowing lookup of buttons from keyboard keys. This was extended with a user dictionary that can be dynamically updated. However, generating the help hotkey hints needed to go in the opposite direction of the dictionary.

The naive approach of iterating through values to find a key for each would perform poorly with O(n^2). Instead, we precalculate a reversed dictionary to lookup keyboard keys from each button. This precalculation is O(n), and setting the keys is also O(n), resulting in O(n) time overall.

πŸ“ˆ Next steps

Development

  • Brief manual for each calculator function (considering reusing the on click functionality from key mapper))
  • Info menubar button with author & project information, and disclaimers
  • Fullscreen button for mobile devices

Preparation for shipping

  • Webpack, choose a license, write readme, publicise repo, host.

Thanks for reading :)

0
29

Comments 0

No comments yet. Be the first!