aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-01-03 13:01:39 -0500
committerB. Watson <urchlay@slackware.uk>2024-01-03 13:01:39 -0500
commitb9ab36a37ae061f500da2909e563b93c42ff6336 (patch)
tree27ab8de0db59d357d907539d9b8ed81fa693853b
parentfb34cf86f6388f7f40109aea4b7c466e6cc178c2 (diff)
downloadhcalc-b9ab36a37ae061f500da2909e563b93c42ff6336.tar.gz
Add i as synonym for _ (+/-).
-rw-r--r--hcalc.rst2
-rw-r--r--input.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/hcalc.rst b/hcalc.rst
index 0dd2235..b54e6ed 100644
--- a/hcalc.rst
+++ b/hcalc.rst
@@ -126,7 +126,7 @@ KEYBOARD
Decimal point. Only works in decimal mode (base 10); other bases
are integer-only.
-**_**
+**_** **i**
Invert sign. The *+/-* key.
**=** **Enter**
diff --git a/input.c b/input.c
index c46a92a..92824e3 100644
--- a/input.c
+++ b/input.c
@@ -306,6 +306,7 @@ key(char c)
break;
case '_': /* The +/- key */
+ case 'i':
if (making_number)
{
if (input_buf[0] == '-')