Question

Im working with XV6 MIT's Open Source OS .

Trying to figure out on what earth can BACKSPACE = 0x100 ? I want to add functions like right arrow and left arrow to control the console and i cant find the right numbers to capture them. ex:

#define BACKSPACE 0x100 // given code
#define RIGHTARROW 0x99 //my addon 0x99 is not the right hex just an example   
if(c == RIGHTARROW){
     ....
    }

So my Q is on what table is BACKSPACE = 0x100 ? its not ASCII ... couldn't find it on scan-codes. tried the showkeys command on Ubuntu and no luck.

anyone with a bit more experience or happened to do the MIT course of Operating system :)

Thanks a lot !

Was it helpful?

Solution

It's a custom character table. 0x100 is control + H, using the definition of 'H' and the control sequence: check out console.c in console_intr(). The table definition can be found in kbd.h. As you found LEFT is 0xE4 (and right 0xE5).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top