src/mess/video/911_vdt.c
| r3495 | r3496 | |
| 567 | 567 | |
| 568 | 568 | static unsigned char repeat_timer; |
| 569 | 569 | enum { repeat_delay = 5 /* approx. 1/10s */ }; |
| 570 | | static char last_key_pressed = -1; |
| 570 | static UINT8 last_key_pressed = 0x80; |
| 571 | 571 | static modifier_state_t last_modifier_state; |
| 572 | 572 | static char foreign_mode; |
| 573 | 573 | |
| r3495 | r3496 | |
| 634 | 634 | /* reset REPEAT timer if the REPEAT key is not pressed */ |
| 635 | 635 | repeat_timer = 0; |
| 636 | 636 | |
| 637 | | if ((last_key_pressed >= 0) && (key_buf[last_key_pressed >> 4] & (1 << (last_key_pressed & 0xf)))) |
| 637 | if (! (last_key_pressed & 0x80) && (key_buf[last_key_pressed >> 4] & (1 << (last_key_pressed & 0xf)))) |
| 638 | 638 | { |
| 639 | 639 | /* last key has not been released */ |
| 640 | 640 | if (modifier_state == last_modifier_state) |
| r3495 | r3496 | |
| 661 | 661 | } |
| 662 | 662 | else |
| 663 | 663 | { |
| 664 | | last_key_pressed = -1; |
| 664 | last_key_pressed = 0x80; |
| 665 | 665 | |
| 666 | 666 | if (vdt[unit].keyboard_data_ready) |
| 667 | 667 | { /* keyboard buffer full */ |
| r3495 | r3496 | |
| 678 | 678 | last_key_pressed = (i << 4) | j; |
| 679 | 679 | last_modifier_state = modifier_state; |
| 680 | 680 | |
| 681 | | vdt[unit].keyboard_data = (int)key_translate[vdt[unit].model][modifier_state][(int)last_key_pressed]; |
| 681 | vdt[unit].keyboard_data = (int)key_translate[vdt[unit].model][modifier_state][last_key_pressed]; |
| 682 | 682 | vdt[unit].keyboard_data_ready = 1; |
| 683 | 683 | if (vdt[unit].keyboard_interrupt_enable) |
| 684 | 684 | (*vdt[unit].int_callback)(1); |