-*int_p = key;
-if(ch[0] != '\0')
- strcpy(input, ch);
-else
- switch(key)
- {
- case SDLK_UP:
- strcpy(input, "Up cursor");
- break;
- case SDLK_DOWN:
- strcpy(input, "Down cursor");
- break;
- case SDLK_LEFT:
- strcpy(input, "Left cursor");
- break;
- case SDLK_RIGHT:
- strcpy(input, "Right cursor");
- break;
- case SDLK_RETURN:
- strcpy(input, "Return");
- break;
- case SDLK_SPACE:
- strcpy(input, "Space");
- break;
- case SDLK_RSHIFT:
- strcpy(input, "Right Shift");
- break;
- case SDLK_LSHIFT:
- strcpy(input, "Left Shift");
- break;
- case SDLK_RCTRL:
- strcpy(input, "Right Control");
- break;
- case SDLK_LCTRL:
- strcpy(input, "Left Control");
- break;
- case SDLK_RALT:
- strcpy(input, "Right Alt");
- break;
- case SDLK_LALT:
- strcpy(input, "Left Alt");
- break;
- default:
- strcpy(input, "?");
- break;
- }
+switch(*item->int_p)
+ {
+ case SDLK_UP:
+ strcpy(item->input, "Up cursor");
+ break;
+ case SDLK_DOWN:
+ strcpy(item->input, "Down cursor");
+ break;
+ case SDLK_LEFT:
+ strcpy(item->input, "Left cursor");
+ break;
+ case SDLK_RIGHT:
+ strcpy(item->input, "Right cursor");
+ break;
+ case SDLK_RETURN:
+ strcpy(item->input, "Return");
+ break;
+ case SDLK_SPACE:
+ strcpy(item->input, "Space");
+ break;
+ case SDLK_RSHIFT:
+ strcpy(item->input, "Right Shift");
+ break;
+ case SDLK_LSHIFT:
+ strcpy(item->input, "Left Shift");
+ break;
+ case SDLK_RCTRL:
+ strcpy(item->input, "Right Control");
+ break;
+ case SDLK_LCTRL:
+ strcpy(item->input, "Left Control");
+ break;
+ case SDLK_RALT:
+ strcpy(item->input, "Right Alt");
+ break;
+ case SDLK_LALT:
+ strcpy(item->input, "Left Alt");
+ break;
+ default:
+ strcpy(item->input, (char*)item->int_p);
+ break;
+ }