|
|
| version 1.7, 2003/10/28 16:44:44 | version 1.13, 2003/12/04 17:12:09 |
|---|---|
| Line 29 static const BYTE keymac[128] = { | Line 29 static const BYTE keymac[128] = { |
| 0x24,0x26,0x28,0x30,0x32,0x2e,0x2f,0x31, | 0x24,0x26,0x28,0x30,0x32,0x2e,0x2f,0x31, |
| // TAB, SPC, , BS, , ESC, , apl ; 0x30 | // TAB, SPC, , BS, , ESC, , apl ; 0x30 |
| 0x0f,0x34, NC,0x0e, NC,0x00, NC, NC, | 0x0f,0x34, NC,0x0e, NC,0x00, NC, NC, |
| // sft, ctl, alt, cps, , , , ; 0x38 | // sft, cps, alt, ctl, , , , ; 0x38 |
| 0x70,0x74,0x73,0x71, NC, NC, NC, NC, | 0x70,0x79,0x73,0x74, NC, NC, NC, NC, // for CW |
| // , [.], , [*], , , [+], ; 0x40 | // , [.], , [*], , , [+], ; 0x40 |
| NC,0x50, NC,0x45, NC, NC,0x49, NC, | NC,0x50, NC,0x45, NC, NC,0x49, NC, |
| // , , , , ret, , [-], clr ; 0x48 | // , , , , ret, , [-], clr ; 0x48 |
| Line 39 static const BYTE keymac[128] = { | Line 39 static const BYTE keymac[128] = { |
| NC,0x4d,0x4e,0x4a,0x4b,0x4c,0x46,0x47, | NC,0x4d,0x4e,0x4a,0x4b,0x4c,0x46,0x47, |
| // [6], [7], , [8], [9], ¡ï, ¡², [,] ; 0x58 | // [6], [7], , [8], [9], ¡ï, ¡², [,] ; 0x58 |
| 0x48,0x42, NC,0x43,0x44,0x0d,0x33,0x4f, | 0x48,0x42, NC,0x43,0x44,0x0d,0x33,0x4f, |
| // F5, F6, F7, F3, F8, F9, , F11 ; 0x60 | // F5, F6, F7, F3, F8, F9,EISU, F11 ; 0x60 |
| 0x66,0x67,0x68,0x64,0x69,0x6a, NC,0x72, | 0x66,0x67,0x68,0x64,0x69,0x6a,0x51,0x72, |
| // , F13, , F14, , F10, , F12 ; 0x68 | // KANA, F13, , F14, , F10, , F12 ; 0x68 |
| NC, NC, NC, NC, NC,0x6b, NC, NC, | 0x35, NC, NC, NC, NC,0x6b, NC, NC, |
| // , F15, hlp, hom, ru, del, F4, end ; 0x70 | // , F15, hlp, hom, ru, del, F4, end ; 0x70 |
| NC, NC,0x3f,0x3e,0x37,0x39,0x65,0x3f, | NC, NC,0x3f,0x3e,0x37,0x39,0x65,0x3f, |
| // F2, rd, F1, ¢«, ¢ª, ¢, ¢¬, ; 0x78 | // F2, rd, F1, ¢«, ¢ª, ¢, ¢¬, ; 0x78 |
| Line 64 static const BYTE keymac2[128] = { | Line 64 static const BYTE keymac2[128] = { |
| NC, NC, NC, NC, NC, NC, NC, NC, | NC, NC, NC, NC, NC, NC, NC, NC, |
| // TAB, SPC, , BS, , ESC, , apl ; 0x30 | // TAB, SPC, , BS, , ESC, , apl ; 0x30 |
| NC, NC, NC, NC, NC, NC, NC, NC, | NC, NC, NC, NC, NC, NC, NC, NC, |
| // sft, ctl, alt, cps, , , , ; 0x38 | // sft, cps, alt, ctl, , , , ; 0x38 |
| NC, NC, NC, NC, NC, NC, NC, NC, | NC, NC, NC, NC, NC, NC, NC, NC, |
| // , [.], , [*], , , [+], ; 0x40 | // , [.], , [*], , , [+], ; 0x40 |
| NC, NC, NC, NC, NC, NC, NC, NC, | NC, NC, NC, NC, NC, NC, NC, NC, |
| Line 93 void mackbd_initialize(void) { | Line 93 void mackbd_initialize(void) { |
| ZeroMemory(&keymap, sizeof(keymap)); | ZeroMemory(&keymap, sizeof(keymap)); |
| } | } |
| #if 0 | |
| void mackbd_callback(void) { | void mackbd_callback(void) { |
| UINT32 tick; | UINT32 tick; |
| Line 132 void mackbd_callback(void) { | Line 133 void mackbd_callback(void) { |
| } | } |
| } | } |
| } | } |
| #endif | |
| void mackbd_f12down(int keycode) { | #define STOPKEY 0x61 |
| #define COPYKEY 0x60 | |
| #define TENKEYEQUAL 0x4d | |
| #define TENKEYCOMMA 0x4f | |
| #define XFERKEY 0x35 | |
| #define NFERKEY 0x51 | |
| #define KANAKEY 0x72 | |
| enum { | |
| F11PUSHED = 0, | |
| F12PUSHED, | |
| }; | |
| static const BYTE f11f12keys[] = { | |
| STOPKEY, COPYKEY, TENKEYEQUAL, TENKEYCOMMA, NFERKEY, XFERKEY}; | |
| static BYTE getf11f12key(int whichkey) { | |
| UINT key; | |
| if (whichkey == F11PUSHED) { | |
| key = (np2oscfg.F11KEY - 1) * 2; | |
| } | |
| else { | |
| key = (np2oscfg.F12KEY - 1) * 2 + 1; | |
| } | |
| if (key < (sizeof(f11f12keys)/sizeof(BYTE))) { | |
| return(f11f12keys[key]); | |
| } | |
| else { | |
| return(NC); | |
| } | |
| } | |
| void mackbd_keydown(int keycode) { | |
| if (keycode == 0x6f) { | if (keycode == 0x6f) { |
| if (np2oscfg.F12COPY == 1) { | if (np2oscfg.F12KEY) { |
| keystat_senddata(0x61); | keystat_senddata(getf11f12key(F12PUSHED)); |
| } | |
| else if (np2oscfg.F12COPY == 2) { | |
| keystat_senddata(0x60); | |
| } | } |
| #if defined(NP2GCC) | #if defined(NP2GCC) |
| else if(!np2oscfg.F12COPY) { | else { |
| mouse_running(MOUSE_XOR); | mousemng_toggle(MOUSEPROC_SYSTEM); |
| menu_setmouse(np2oscfg.MOUSE_SW ^ 1); | menu_setmouse(np2oscfg.MOUSE_SW ^ 1); |
| sysmng_update(SYS_UPDATECFG); | sysmng_update(SYS_UPDATECFG); |
| toggleMenubar(); | |
| } | } |
| #endif | #endif |
| } | } |
| else if (keycode == 0x67) { | |
| if (np2oscfg.F11KEY) { | |
| keystat_senddata(getf11f12key(F11PUSHED)); | |
| } | |
| else { | |
| keystat_senddata(KANAKEY); | |
| } | |
| } | |
| else { | else { |
| BYTE data; | BYTE data; |
| data = keymac[keycode]; | data = keymac[keycode]; |
| Line 160 void mackbd_f12down(int keycode) { | Line 201 void mackbd_f12down(int keycode) { |
| } | } |
| } | } |
| void mackbd_f12up(int keycode) { | void mackbd_keyup(int keycode) { |
| if (keycode == 0x6f) { | if (keycode == 0x6f) { |
| if (np2oscfg.F12COPY == 1) { | if (np2oscfg.F12KEY) { |
| keystat_senddata(0x61 | 0x80); | keystat_senddata(getf11f12key(F12PUSHED) | 0x80); |
| } | } |
| else if (np2oscfg.F12COPY == 2) { | } |
| keystat_senddata(0x60 | 0x80); | else if (keycode == 0x67) { |
| if (np2oscfg.F11KEY) { | |
| keystat_senddata(getf11f12key(F11PUSHED) | 0x80); | |
| } | } |
| } | } |
| else { | else { |
| Line 179 void mackbd_f12up(int keycode) { | Line 222 void mackbd_f12up(int keycode) { |
| } | } |
| } | } |
| void mackbd_resetf11f12(void) { | |
| UINT i; | |
| for (i=0; i<(sizeof(f11f12keys)/sizeof(BYTE)); i++) { | |
| keystat_forcerelease(f11f12keys[i]); | |
| } | |
| } |