Example #1
0
static void my_kbd_handlerx (int scancode, int newstate)
{
    int akey = scancode2amiga (scancode);

    assert (scancode >= 0 && scancode < 0x100);
    if (scancode == SCODE_F12) {
	uae_quit ();
    } else if (scancode == SCODE_F11) {
	gui_requested = 1;
    }
    if (keystate[scancode] == newstate)
	return;

    keystate[scancode] = newstate;

    if (akey == -1)
	return;

    if (newstate == KEY_EVENTPRESS) {
	if (akey == AK_inhibit)
	    toggle_inhibit_frame (0);
	else
	    record_key (akey << 1);
    } else
	record_key ((akey << 1) | 1);

    /* "Affengriff" */
    if ((keystate[AK_CTRL] || keystate[AK_RCTRL]) && keystate[AK_LAMI] && keystate[AK_RAMI])
	uae_reset ();
}
Example #2
0
static int DISPLAY (const char *line)
{
    if      (matchstr (&line, "ON"))     clear_inhibit_frame (IHF_SCROLLLOCK);
    else if (matchstr (&line, "OFF"))    set_inhibit_frame (IHF_SCROLLLOCK);
    else if (matchstr (&line, "TOGGLE")) toggle_inhibit_frame (IHF_SCROLLLOCK);
    else return RC_ERROR;
    return RC_OK;
}