scancodes to ascii, const char declaration

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
OSNewbie

scancodes to ascii, const char declaration

Post by OSNewbie »

in my keyboard isr, i want to convert scan codes to ascii characters, so i have a line:

const char SCAN2ASCII[128] = "\0\01234567890-= .... fills up 128 bytes ... ";

well anyway, is there some way to make the second byte (the second \0) 27 or any byte value? what is the syntax for doing that? i mean, i want the bytes of SCAN2ASCII to be like this: 0, 27, '1', '2', '3', ... but i dont know how to insert a value of 27...

thanks
uri

RE:scancodes to ascii, const char declaration

Post by uri »

try something like this:

const char SCAN2ASCII[128] = {'\0', 27, '1', '2', .....  };
Post Reply