Skip to content

thinkverse/calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calculator

A simple, responsive calculator built with HTML, CSS, and JavaScript. Supports mouse and keyboard input.

Quick start

Open the app directly:

  • Double-click index.html

Or serve locally (recommended):

Features

  • Basic operations: add, subtract, multiply, divide
  • Equals, clear (AC), toggle sign (±), percent (%)
  • Decimal input
  • Keyboard support

Keyboard shortcuts

  • Digits: 0–9
  • Decimal: .
  • Operators: +, -, *, /
  • Evaluate: Enter or =
  • Clear: C
  • Delete last: Backspace
  • Percent: %

Project structure

  • index.html — markup and calculator controls
  • styles.css — layout, theming (light/dark support), responsive styles
  • script.js — calculator state, operations, and keyboard handling

Development notes

  • No build tools required; pure static files
  • Accessible output region with aria-live for display updates
  • Thousand separators in display for readability

License

MIT