- if (c == cfg->mouse_toggle_key) {
- mouse_hook_enabled ^= 1;
- printf("Mouse hook %s.\n", mouse_hook_enabled ? "enabled" : "disabled");
- mouse_dx = mouse_dy = mouse_buttons = 0;
- }
- if (c == 'r') {
- cpu_emulation_running ^= 1;
- printf("CPU emulation is now %s\n", cpu_emulation_running ? "running" : "stopped");
+ if (!kb_hook_enabled) {
+ if (c == cfg->mouse_toggle_key) {
+ mouse_hook_enabled ^= 1;
+ printf("Mouse hook %s.\n", mouse_hook_enabled ? "enabled" : "disabled");
+ mouse_dx = mouse_dy = mouse_buttons = 0;
+ }
+ if (c == 'r') {
+ cpu_emulation_running ^= 1;
+ printf("CPU emulation is now %s\n", cpu_emulation_running ? "running" : "stopped");
+ }
+ if (c == 'R') {
+ cpu_pulse_reset();
+ m68k_pulse_reset();
+ printf("CPU emulation reset.\n");
+ }
+ if (c == 'q') {
+ printf("Quitting and exiting emulator.\n");
+ goto stop_cpu_emulation;
+ }