예제 #1
0
파일: svga.c 프로젝트: Pa0l0ne/Amiga360
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 ();
}
예제 #2
0
파일: keyboard.c 프로젝트: bernds/UAE
int my_kbd_handler (int keycode, int scancode, int newstate)
{
    int akey = scancode2amiga (keycode, scancode);

#ifdef DEBUG_KBD
    write_log ( "kbd_handler: keycode 0x%x, scancode 0x%x, newstate %d\n", keycode, scancode, newstate );
#endif
    if (akey < 0) {
	
	switch (akey) {
#ifndef _WIN32_WCE
	 case -2:
	    if (newstate)
		{
		clearallkeys();
		WIN32GUI_DisplayGUI(-1);
		}
	    return 0;

	 case -3:
	    if (newstate)
		toggle_sound = 1;
	    return 0;
	 case -4:
	    if (newstate) {
		akey = 0x62;
		newstate = getcapslock ();
	    }
	    break;
     case -5:
	 if( newstate )
	 {
	    // Bring up GUI-based debugger here
	  if(currprefs.illegal_mem)
		   {   
	
		   
	     if(picasso_on)changed_prefs.gfx_pfullscreen=0;
		 else changed_prefs.gfx_afullscreen=0;

		 check_prefs_changed_gfx();
	 activate_debugger();
		 
	   
	 }
	    
		 }
	 return 0;
	 break;
	 case -6:
		 if(newstate)
		 {
		 if(picasso_on)changed_prefs.gfx_pfullscreen=!changed_prefs.gfx_pfullscreen;
		 else changed_prefs.gfx_afullscreen=!changed_prefs.gfx_afullscreen;

		 return 0;
		 }
		 break;
	 default:

	     if (newstate && akey >= -17 && akey <= -10) 
	     {
		 akey = -10 - akey;
		 
		 if (akey & 1) 
		 {
		     akey >>= 1;
		     disk_eject (akey);
		     return 0;
		 }
		 akey >>= 1;
		 
		 WIN32GUI_DisplayGUI( akey );
	     }
	     return 0;
#endif
	}