Friday, June 24, 2011

Re: What is the <80>kb character code?

Reply to message «What is the <80>kb character code?»,
sent 19:24:44 24 June 2011, Friday
by Andrew Neil:

Byte 0x80 is an escape byte that designates the start of internal vim
representation of special keys. More info can be found somewhere in vim source.
Don't rely on this escape codes (and 0x80 byte itself) being the same: it will
be replaced sometime as now it can handle almost no key combinations.

Original message:
> Suppose I was to type the following:
>
> qq
> oHello, Wordl!<BS><BS><BS>ld!<Esc>
> q
>
> For the purposes of illustration here, I'm using <BS> to stand for the
> backspace key, and <Esc> to stand for the escape key. Now, if I put the
> contents of the 'q' register into the document (e.g. `:put q`), it looks
> like this:
>
> oHello, wordl!<80>kb<80>kb<80>kbld!
>
> It looks like Vim saves the actual key codes, so instead of the <Esc>
> notation I get ^[. That much is clear, but I'm confused by the key code
> for the backspace key: <80>kb. The <80> looks like four separate
> characters, but it's just a single character. If I place my cursor on it
> and press `ga`, it reveals the following info:
>
> <Â<80>> 128, Hex 0080, Octal 200
>
> What is this character? And how does <80>kb relate to the backspace key?
>
> Thanks,
> Drew

No comments:

Post a Comment