| version 1.1, 2003/11/26 15:08:42 | version 1.2, 2003/12/19 16:08:02 | 
| Line 38 | Line 38 | 
 | #include <qkeycode.h> | #include <qkeycode.h> | 
 |  |  | 
 |  |  | 
| #define NC      0xff | #define NC      KEYBOARD_KC_NC | 
 |  |  | 
 | static BYTE get_data(int keysym, BYTE down); | static BYTE get_data(int keysym, BYTE down); | 
 |  |  | 
| Line 53  emulationWindow::keyPressEvent(QKeyEvent | Line 53  emulationWindow::keyPressEvent(QKeyEvent | 
 | { | { | 
 | int keysym = ev->key(); | int keysym = ev->key(); | 
 |  |  | 
| if ((keysym == Qt::Key_F12) && (np2oscfg.F12COPY == 0)) { | if ((keysym == Qt::Key_F12) && (np2oscfg.F12KEY == 0)) { | 
 | mouse_running(M_XOR);   // XXX | mouse_running(M_XOR);   // XXX | 
 | return; | return; | 
 | } | } | 
| Line 76  emulationWindow::keyReleaseEvent(QKeyEve | Line 76  emulationWindow::keyReleaseEvent(QKeyEve | 
 | { | { | 
 | int keysym = ev->key(); | int keysym = ev->key(); | 
 |  |  | 
| if ((keysym == Qt::Key_F12) && (np2oscfg.F12COPY == 0)) { | if ((keysym == Qt::Key_F12) && (np2oscfg.F12KEY == 0)) { | 
 | return; | return; | 
 | } | } | 
 |  |  | 
| Line 225  static const BYTE keyconv_misc[256] = { | Line 225  static const BYTE keyconv_misc[256] = { | 
 | }; | }; | 
 |  |  | 
 | static const BYTE *keyconv; | static const BYTE *keyconv; | 
 | static const BYTE f12keys[] = { 0x61, 0x60, 0x4d, 0x4f }; |  | 
 |  |  | 
 |  |  | 
 | BOOL | BOOL | 
| Line 238  kbdmng_init(void) | Line 237  kbdmng_init(void) | 
 | } | } | 
 |  |  | 
 | static BYTE | static BYTE | 
 | getf12key(void) |  | 
 | { |  | 
 | int key; |  | 
 |  |  | 
 | key = np2oscfg.F12COPY - 1; |  | 
 | if (key < NELEMENTS(f12keys)) |  | 
 | return f12keys[key]; |  | 
 | return NC; |  | 
 | } |  | 
 |  |  | 
 | void |  | 
 | qtkbd_resetf12() |  | 
 | { |  | 
 | int i; |  | 
 |  |  | 
 | for (i = 0; i < NELEMENTS(f12keys); i++) { |  | 
 | keystat_forcerelease(f12keys[i]); |  | 
 | } |  | 
 | } |  | 
 |  |  | 
 | static BYTE |  | 
 | get_data(int keysym, BYTE down) | get_data(int keysym, BYTE down) | 
 | { | { | 
 | BYTE data; | BYTE data; | 
| Line 267  get_data(int keysym, BYTE down) | Line 245  get_data(int keysym, BYTE down) | 
 | if ((keysym & 0xffffff00) != 0x00001000) { | if ((keysym & 0xffffff00) != 0x00001000) { | 
 | data = NC; | data = NC; | 
 | } else if (keysym == Qt::Key_F12) { | } else if (keysym == Qt::Key_F12) { | 
| data = getf12key(); | data = kbdmng_getf12key(); | 
 | } else { | } else { | 
 | data = keyconv_misc[keysym & 0xff]; | data = keyconv_misc[keysym & 0xff]; | 
 | if (data == 0x70) { | if (data == 0x70) { |