Monday, 26 September 2011

Issue with Matrix compiler

I got everything work on Visual Studio,
but when I tried Matrix compiler, some of the keys like END, HOME,DELETE, INSERT, F1-F12 dont work.

Anyone know how to fix this problem?

6 comments:

  1. Every key except for HOME and END work for me. However...

    Doing some tests, curses.h's KEY_HOME and KEY_END don't match up with the value that is being read. On Matrix, pressing the HOME key gives me a value of 362, and END gives me 385. However, outputting curses.h's KEY_HOME and KEY_END macros on Matrix gives me 262 and 360. This makes the getKey() function register the HOME/END keypresses as UNKNOWN. I don't know why there's a mismatch, but a messy hack you can try is to go to the LINUX/UNIX platform getKey() function and add the specific numbers to the switch statement, for example:

    case 362: key = HOME; break;
    case 385: key = END; break;

    If other keys don't work for you, check if the value of your key press matches up with what is defined in curses.h.

    Now, if only the F1-F12 keys on Matrix didn't insert some garbage data...

    ReplyDelete
  2. I tried to modify the getkey() in LINUX/UNIX platform, it didnt help.
    Did you get it to work?

    ReplyDelete
  3. I tried to use ::getch(); to see what the key value on matrix, all I get for F1-F12 and other keys are 27.

    ReplyDelete
  4. To output values, I modified the default case within getKey() to output what the current key value is before it is assigned to UNKNOWN.

    ReplyDelete
  5. Anyway, after I talk with some of my friends today, apparently, you need to download putty instead of SSH. Here is the link for the download page + instruction.
    https://cs.senecac.on.ca/~chris.szalwinski/resources/putty.html

    All the keys are working now with PUtty.

    ReplyDelete
  6. I was using putty since the beginning but I didn't have the Terminal Type string set to "puttyxterm". Changing this line fixes both my Home/End keys and F1-F12 don't input garbage data.

    Thanks!

    ReplyDelete