diff options
Diffstat (limited to 'hcalc.1')
-rw-r--r-- | hcalc.1 | 124 |
1 files changed, 64 insertions, 60 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\&. |