mirror of
https://github.com/mist-devel/mist-firmware.git
synced 2026-02-01 22:12:24 +00:00
OSD Shortcuts fixed.
This commit is contained in:
28
keycodes.h
28
keycodes.h
@@ -190,7 +190,7 @@ const unsigned short usb2atari[] = {
|
||||
0x0b, // 27: 0
|
||||
0x1c | OSD_LOC, // 28: Return
|
||||
0x01 | OSD_LOC, // 29: Escape
|
||||
0x0e, // 2a: Backspace
|
||||
0x0e | OSD_LOC, // 2a: Backspace
|
||||
0x0f, // 2b: Tab
|
||||
0x39 | OSD_LOC, // 2c: Space
|
||||
0x0c, // 2d: -
|
||||
@@ -222,11 +222,11 @@ const unsigned short usb2atari[] = {
|
||||
NUM_LOCK_TOGGLE, // 47: Scroll Lock
|
||||
MISS, // 48: Pause
|
||||
0x52, // 49: Insert
|
||||
0x47, // 4a: Home
|
||||
0x62, // 4b: Page Up
|
||||
0x47 | OSD_LOC, // 4a: Home
|
||||
0x62 | OSD_LOC, // 4b: Page Up
|
||||
0x53, // 4c: Delete
|
||||
MISS, // 4d: End
|
||||
0x61, // 4e: Page Down
|
||||
0x61 | OSD_LOC, // 4e: Page Down
|
||||
0x4d, // 4f: Right Arrow
|
||||
0x4b, // 50: Left Arrow
|
||||
0x50 | OSD_LOC, // 51: Down Arrow
|
||||
@@ -263,16 +263,16 @@ const unsigned short usb2atari[] = {
|
||||
};
|
||||
|
||||
// OSD uses amiga keycodes. This table translates from usb to OSD/amiga
|
||||
const unsigned char usb2osd[][2] = {
|
||||
{ 0x45, KEY_MENU },
|
||||
{ 0x65, KEY_MENU },
|
||||
{ 0x52, KEY_UP },
|
||||
{ 0x51, KEY_DOWN },
|
||||
{ 0x28, KEY_ENTER },
|
||||
{ 0x29, KEY_ESC },
|
||||
{ 0x2c, KEY_SPACE },
|
||||
{ 0,0 }
|
||||
};
|
||||
// const unsigned char usb2osd[][2] = {
|
||||
// { 0x45, KEY_MENU },
|
||||
// { 0x65, KEY_MENU },
|
||||
// { 0x52, KEY_UP },
|
||||
// { 0x51, KEY_DOWN },
|
||||
// { 0x28, KEY_ENTER },
|
||||
// { 0x29, KEY_ESC },
|
||||
// { 0x2c, KEY_SPACE },
|
||||
// { 0,0 }
|
||||
// };
|
||||
|
||||
#if 0
|
||||
// #define KEY_UPSTROKE 0x80
|
||||
|
||||
26
user_io.c
26
user_io.c
@@ -334,16 +334,16 @@ unsigned char modifier_keycode(unsigned char index) {
|
||||
return MISS;
|
||||
}
|
||||
|
||||
unsigned char osdcode(unsigned char c) {
|
||||
int i = 0;
|
||||
while(usb2osd[i][0] && usb2osd[i][0] != c)
|
||||
i++;
|
||||
// unsigned char osdcode(unsigned char c) {
|
||||
// int i = 0;
|
||||
// while(usb2osd[i][0] && usb2osd[i][0] != c)
|
||||
// i++;
|
||||
|
||||
if(!usb2osd[i][0])
|
||||
iprintf("ERROR: Unsupported OSD code %x!\n", c);
|
||||
// if(!usb2osd[i][0])
|
||||
// iprintf("ERROR: Unsupported OSD code %x!\n", c);
|
||||
|
||||
return usb2osd[i][1];
|
||||
}
|
||||
// return usb2osd[i][1];
|
||||
// }
|
||||
|
||||
// set by OSD code to suppress forwarding of those keys to the core which
|
||||
// may be in use by an active OSD
|
||||
@@ -422,8 +422,9 @@ void user_io_kbd(unsigned char m, unsigned char *k) {
|
||||
// don't send break for caps lock
|
||||
if(j == 6) {
|
||||
// special OSD key handled internally
|
||||
if(code & OSD_LOC)
|
||||
OsdKeySet(0x80 | osdcode(pressed[i]));
|
||||
//if(code & OSD_LOC)
|
||||
//OsdKeySet(0x80 | osdcode(pressed[i]));
|
||||
OsdKeySet(0x80 | usb2ami[pressed[i]]);
|
||||
|
||||
if(!key_used_by_osd(code)) {
|
||||
if(is_emu_key(pressed[i])) {
|
||||
@@ -451,8 +452,9 @@ void user_io_kbd(unsigned char m, unsigned char *k) {
|
||||
|
||||
if(j == 6) {
|
||||
// special OSD key handled internally
|
||||
if(code & OSD_LOC)
|
||||
OsdKeySet(osdcode(k[i]));
|
||||
//if(code & OSD_LOC)
|
||||
//OsdKeySet(osdcode(k[i]));
|
||||
OsdKeySet(usb2ami[k[i]]);
|
||||
|
||||
// no further processing of any key that is currently
|
||||
// redirected to the OSD
|
||||
|
||||
Reference in New Issue
Block a user