diff options
author | B. Watson <urchlay@slackware.uk> | 2024-01-09 21:32:43 -0500 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2024-01-09 21:32:43 -0500 |
commit | de4dffd8bb02dbd2969edc44e4915decb75e9b1d (patch) | |
tree | a45c488a323df8a825e6a8b183ac939a45ab085a | |
parent | e439c8e385c197d9ff75ebd50379bcf72ddd58b8 (diff) | |
download | hcalc-de4dffd8bb02dbd2969edc44e4915decb75e9b1d.tar.gz |
Rearrange man page.
-rw-r--r-- | hcalc.1 | 124 | ||||
-rw-r--r-- | hcalc.rst | 124 |
2 files changed, 128 insertions, 120 deletions
@@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "HCALC" 1 "2024-01-05" "1.2u1" "Urchlay's Misc Stuff" +.TH "HCALC" 1 "2024-01-09" "1.2u1" "Urchlay's Misc Stuff" .SH NAME hcalc \- graphical hex calculator .\" RST source for hcalc(1) man page. Convert with: @@ -101,83 +101,91 @@ mode, there is no prefix. .sp In case of error (e.g. division by zero), the display will show \fBerr\fP, and you\(aqll have to press \fICLR\fP to continue. -.SH MOUSE -.sp -Mouse operation is simple: for the most part, just click on the -buttons to press them. -.sp -There\(aqs no \fI%\fP button for the modulus operator, but you can -right\-click on the \fI÷\fP (division) key. +.SH BUTTONS .sp -Right\-clicking (or any button other than 1) on the \fICLR\fP key exits -\fBhcalc\fP\&. -.sp -For the numeric display, clicking button 1 (usually the left one) -copies the number to the X selection buffer. Clicking any other -button pastes from X, but beware: pasting anything but a number in -the current base might have unexpected effects, because all pasted -characters are treated as keystrokes (so, e.g. pasting a capital Q -quits the application). This can be useful, e.g. if you paste "2+2=", -\fBhcalc\fP will display "4". -.SH KEYBOARD +The user interface mimics a pocket calculator, so it\(aqs made of +buttons. Each button can be pressed either by clicking on it with the +mouse, or pressing its keystroke (given in \fBbold\fP). A few buttons +have multiple functions, depending on which mouse button is used. .INDENT 0.0 .TP -.B \fB0\-9\fP, \fBa\-f\fP +.B \fI0\fP to \fI9\fP, \fIA\fP to \fIF\fP (\fB0\-9\fP, \fBa\-f\fP) Digits. Lowercase only for the hex digits. Entering digits larger than the current number base is impossible (e.g. hex digits when in decimal mode, or digits other than 0 or 1 in binary mode) and will be ignored. .TP -.B \fB+\fP \fB\-\fP \fB*\fP \fBx\fP \fB/\fP \fB%\fP -Arithmetic: addition, subtraction, multiplication, division, modulus. Note that -\fBx\fP is the same as \fB*\fP\&. -.TP -.B \fB\&.\fP +.B \fI\&.\fP (\fB\&.\fP) Decimal point. Only works in decimal mode (base 10); other bases are integer\-only. .TP -.B \fB_\fP \fBi\fP -Invert sign. The \fI+/\-\fP key. +.B \fI+\fP \fI\-\fP \fIx\fP \fI÷\fP (\fB+\fP \fB\-\fP \fB*\fP \fBx\fP \fB/\fP \fB%\fP) +Arithmetic: addition, subtraction, multiplication, division (modulus with +right\-click). Note that the \fBx\fP key is the same as \fB*\fP\&. +.TP +.B \fI=\fP (\fB=\fP \fBEnter\fP) +Finish the calculation and display the result. .TP -.B \fB=\fP \fBEnter\fP -The \fI=\fP key (equals). +.B \fI+/\-\fP (\fB_\fP \fBi\fP) +Invert sign. .TP -.B \fB&\fP \fB|\fP \fB^\fP \fB~\fP -Boolean operations. AND, OR, XOR, NOT (unary). +.B \fIINV\fP (\fB~\fP) +Unary NOT; invert the bits in the current number. .TP -.B \fB<\fP \fB>\fP -Bit shifts, unary. Left 1 bit, right 1 bit. +.B \fIOR\fP \fIAND\fP \fIXOR\fP (\fB&\fP \fB|\fP \fB^\fP) +Boolean operations. .TP -.B \fBS\fP -\fISHF\fP key: shift left/right by some number of bits (binary +.B \fIDEC\fP \fIHEX\fP \fIOCT\fP \fIBIN\fP (\fBD\fP \fBH\fP \fBO\fP \fBB\fP or \fBF1\fP to \fBF4\fP) +Change the number base. The number being displayed will be converted +to the new base. +.TP +.B \fIDEL\fP (\fBBackspace\fP or \fBDelete\fP) +Delete the last digit entered. Deleting the last digit results in 0. +.TP +.B \fISTO\fP \fIRCL\fP \fISUM\fP (\fB[\fP, \fB]\fP, \fB}\fP) +Store to memory (like \fIM\fP on most calculators); recall memory (like \fIMR\fP); +add current value to memory (like \fIM+\fP). +.TP +.B \fI<<*\fP \fI>>\fP (\fB<\fP \fB>\fP) +Bit shift by one position, left or right. +.TP +.B \fISHF\fP (\fBS\fP) +Shift left/right by some number of bits (binary operation, like addition). Shifts left for positive numbers and right for negative. This is less confusing than it sounds: 1 shifted left once is 2, \-1 shifted right once in \-2. .TP -.B \fBBackspace\fP \fBDelete\fP -\fIDEL\fP key: delete the rightmost digit. -.TP -.B \fBC\fP \fBEscape\fP -\fICLR\fP key: clears the number and any pending operation. -.TP -.B \fBu\fP -\fICE\fP (clear entry) key. Clears the number being entered, same as backspacing over it, +.B \fICE\fP (\fBu\fP) +Clears the number being entered, same as backspacing over it, but does not clear any pending operation. .TP -.B \fBD\fP \fBH\fP \fBO\fP \fBB\fP -\fIDEC\fP \fIHEX\fP \fIOCT\fP \fIBIN\fP keys. -Set the number base to decimal, hex, octal, or binary. The -number currently displayed is converted into the new base. -These are capital letters (hold down Shift). -.TP -.B \fBF1\fP \fBF2\fP \fBF3\fP \fBF4\fP -Same as \fBD\fP \fBH\fP \fBO\fP \fBB\fP\&. -.TP -.B \fB[\fP \fB]\fP \fB}\fP -\fISTO\fP (store number), \fIRCL\fP (recall stored number), \fISUM\fP -(add current number to stored number). \fISTO\fP, \fIRCL\fP, and \fISUM\fP are -the same as \fIM\fP, \fIMR\fP, and \fIM+\fP on \(aqpocket\(aq calculators. +.B \fICLR\fP (\fBC\fP, \fBEscape\fP) +Clears the display, memory, and any pending operation. With right\-click, +exits \fBhcalc\fP (use \fBQ\fP or \fB^Q\fP to quit from the keyboard). +.UNINDENT +.SH MOUSE +.sp +Mouse operation is simple: for the most part, just click on the +buttons to press them. +.sp +There\(aqs no \fI%\fP button for the modulus operator, but you can +right\-click on the \fI÷\fP (division) key. +.sp +Right\-clicking (or any button other than 1) on the \fICLR\fP key exits +\fBhcalc\fP\&. +.sp +For the numeric display, clicking button 1 (usually the left one) +copies the number to the X selection buffer. Clicking any other +button pastes from X, but beware: pasting anything but a number in +the current base might have unexpected effects, because all pasted +characters are treated as keystrokes (so, e.g. pasting a capital Q +quits the application). This can be useful, e.g. if you paste "2+2=", +\fBhcalc\fP will display "4". +.SH KEYBOARD +.sp +These keys don\(aqt have calculator buttons. +.INDENT 0.0 .TP .B \fB^C\fP Copy the current number to the X selection @@ -190,10 +198,6 @@ Same as clicking a mouse button other than 1 (right\-clicking) on the number dis .B \fBq\fP Quiet. Toggles the audible bell. .TP -.B \fBQ\fP \fB^Q\fP -Quit \fBhcalc\fP\&. Capital letter, so press Shift. Control\-Q does -the same thing. -.TP .B \fBz\fP Zoom: change window size. Alternates between the 3 sizes: \fB\-small\fP, \fB\-medium\fP, \fB\-large\fP\&. @@ -87,6 +87,69 @@ mode, there is no prefix. In case of error (e.g. division by zero), the display will show **err**, and you'll have to press *CLR* to continue. +BUTTONS +======= + +The user interface mimics a pocket calculator, so it's made of +buttons. Each button can be pressed either by clicking on it with the +mouse, or pressing its keystroke (given in **bold**). A few buttons +have multiple functions, depending on which mouse button is used. + +*0* to *9*, *A* to *F* (**0-9**, **a-f**) + Digits. Lowercase only for the hex digits. Entering digits + larger than the current number base is impossible (e.g. hex digits + when in decimal mode, or digits other than 0 or 1 in binary mode) and + will be ignored. + +*.* (**.**) + Decimal point. Only works in decimal mode (base 10); other bases + are integer-only. + +*+* *-* *x* *÷* (**+** **-** **\*** **x** **/** **%**) + Arithmetic: addition, subtraction, multiplication, division (modulus with + right-click). Note that the **x** key is the same as **\***. + +*=* (**=** **Enter**) + Finish the calculation and display the result. + +*+/-* (**_** **i**) + Invert sign. + +*INV* (**~**) + Unary NOT; invert the bits in the current number. + +*OR* *AND* *XOR* (**&** **|** **^**) + Boolean operations. + +*DEC* *HEX* *OCT* *BIN* (**D** **H** **O** **B** or **F1** to **F4**) + Change the number base. The number being displayed will be converted + to the new base. + +*DEL* (**Backspace** or **Delete**) + Delete the last digit entered. Deleting the last digit results in 0. + +*STO* *RCL* *SUM* (**[**, **]**, **}**) + Store to memory (like *M* on most calculators); recall memory (like *MR*); + add current value to memory (like *M+*). + +*<<** *>>* (**<** **>**) + Bit shift by one position, left or right. + +*SHF* (**S**) + Shift left/right by some number of bits (binary + operation, like addition). Shifts left for positive + numbers and right for negative. This is less confusing + than it sounds: 1 shifted left once is 2, -1 shifted right + once in -2. + +*CE* (**u**) + Clears the number being entered, same as backspacing over it, + but does not clear any pending operation. + +*CLR* (**C**, **Escape**) + Clears the display, memory, and any pending operation. With right-click, + exits **hcalc** (use **Q** or **^Q** to quit from the keyboard). + MOUSE ===== @@ -110,62 +173,7 @@ quits the application). This can be useful, e.g. if you paste "2+2=", KEYBOARD ======== -**0-9**, **a-f** - Digits. Lowercase only for the hex digits. Entering digits - larger than the current number base is impossible (e.g. hex digits - when in decimal mode, or digits other than 0 or 1 in binary mode) and - will be ignored. - -**+** **-** **\*** **x** **/** **%** - Arithmetic: addition, subtraction, multiplication, division, modulus. Note that - **x** is the same as **\***. - -**.** - Decimal point. Only works in decimal mode (base 10); other bases - are integer-only. - -**_** **i** - Invert sign. The *+/-* key. - -**=** **Enter** - The *=* key (equals). - -**&** **|** **^** **~** - Boolean operations. AND, OR, XOR, NOT (unary). - -**<** **>** - Bit shifts, unary. Left 1 bit, right 1 bit. - -**S** - *SHF* key: shift left/right by some number of bits (binary - operation, like addition). Shifts left for positive - numbers and right for negative. This is less confusing - than it sounds: 1 shifted left once is 2, -1 shifted right - once in -2. - -**Backspace** **Delete** - *DEL* key: delete the rightmost digit. - -**C** **Escape** - *CLR* key: clears the number and any pending operation. - -**u** - *CE* (clear entry) key. Clears the number being entered, same as backspacing over it, - but does not clear any pending operation. - -**D** **H** **O** **B** - *DEC* *HEX* *OCT* *BIN* keys. - Set the number base to decimal, hex, octal, or binary. The - number currently displayed is converted into the new base. - These are capital letters (hold down Shift). - -**F1** **F2** **F3** **F4** - Same as **D** **H** **O** **B**. - -**[** **]** **}** - *STO* (store number), *RCL* (recall stored number), *SUM* - (add current number to stored number). *STO*, *RCL*, and *SUM* are - the same as *M*, *MR*, and *M+* on 'pocket' calculators. +These keys don't have calculator buttons. **^C** Copy the current number to the X selection @@ -178,10 +186,6 @@ KEYBOARD **q** Quiet. Toggles the audible bell. -**Q** **^Q** - Quit **hcalc**. Capital letter, so press Shift. Control-Q does - the same thing. - **z** Zoom: change window size. Alternates between the 3 sizes: **-small**, **-medium**, **-large**. |