0001 Software cursor for VGA
0002 =======================
0003
0004 by Pavel Machek <pavel@atrey.karlin.mff.cuni.cz>
0005 and Martin Mares <mj@atrey.karlin.mff.cuni.cz>
0006
0007 Linux now has some ability to manipulate cursor appearance. Normally,
0008 you can set the size of hardware cursor. You can now play a few new
0009 tricks: you can make your cursor look like a non-blinking red block,
0010 make it inverse background of the character it's over or to highlight
0011 that character and still choose whether the original hardware cursor
0012 should remain visible or not. There may be other things I have never
0013 thought of.
0014
0015 The cursor appearance is controlled by a ``<ESC>[?1;2;3c`` escape sequence
0016 where 1, 2 and 3 are parameters described below. If you omit any of them,
0017 they will default to zeroes.
0018
0019 first Parameter
0020 specifies cursor size::
0021
0022 0=default
0023 1=invisible
0024 2=underline,
0025 ...
0026 8=full block
0027 + 16 if you want the software cursor to be applied
0028 + 32 if you want to always change the background color
0029 + 64 if you dislike having the background the same as the
0030 foreground.
0031
0032 Highlights are ignored for the last two flags.
0033
0034 second parameter
0035 selects character attribute bits you want to change
0036 (by simply XORing them with the value of this parameter). On standard
0037 VGA, the high four bits specify background and the low four the
0038 foreground. In both groups, low three bits set color (as in normal
0039 color codes used by the console) and the most significant one turns
0040 on highlight (or sometimes blinking -- it depends on the configuration
0041 of your VGA).
0042
0043 third parameter
0044 consists of character attribute bits you want to set.
0045
0046 Bit setting takes place before bit toggling, so you can simply clear a
0047 bit by including it in both the set mask and the toggle mask.
0048
0049 Examples
0050 --------
0051
0052 To get normal blinking underline, use::
0053
0054 echo -e '\033[?2c'
0055
0056 To get blinking block, use::
0057
0058 echo -e '\033[?6c'
0059
0060 To get red non-blinking block, use::
0061
0062 echo -e '\033[?17;0;64c'