send nmi/int7 when pause pressed

This commit is contained in:
nine
2021-02-21 01:55:03 +00:00
committed by just nine
parent 0c6996c0ad
commit 748d921f62
2 changed files with 12 additions and 0 deletions

View File

@@ -65,6 +65,12 @@ int handle_modifier(struct input_event *ev) {
#define KEYCASE(a, b, c)case a: return (lshift || rshift) ? c : b;
/**
* translates keycodes back into a simpler enumerable value for handling emulator command events
*
* @param *struct/input_event ev pointer to input layer event structure
* @return char
*/
char char_from_input_event(struct input_event *ev) {
switch(ev->code) {
KEYCASE(KEY_A, 'a', 'A');
@@ -104,6 +110,7 @@ char char_from_input_event(struct input_event *ev) {
KEYCASE(KEY_9, '9', '(');
KEYCASE(KEY_0, '0', ')');
KEYCASE(KEY_F12, 0x1B, 0x1B);
KEYCASE(KEY_PAUSE, 0x01, 0x01);
default:
return 0;
}