Skip to content

mahmoudmerghani/calculator-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

calculator-js

Live Demo

Calculator Keyboard Mapping

This document provides an overview of the keyboard shortcuts available for controlling the calculator. These mappings help streamline the calculator's functionality, allowing you to perform operations quickly using your keyboard.

Keyboard Shortcuts

Basic Operations

  • Number Keys (0-9): Input the corresponding number.
  • Addition (+): Input the addition operator.
  • Subtraction (-): Input the subtraction operator.
  • Multiplication (*): Input the multiplication operator (×).
  • Division (/): Input the division operator (÷).
  • Decimal Point (.): Input the decimal point.

Special Keys

  • Answer (a or A): Input the ans placeholder for the previous result.
  • Enter or Equals (Enter or =): Calculate the result and display it. (e.preventDefault() is called to prevent the default action of the Enter key in some environments.)

Modifier Keys

  • Shift + (+ or -): Toggle the sign of the current number input.
  • Escape or Ctrl + Backspace: Clear all inputs and reset the calculator.
  • Backspace: Delete the last input character.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published