コード例 #1
0
ファイル: sdlkeys.c プロジェクト: engur/PUAE
int keysym2amiga (int keysym)
{
    int amiga_keycode = kc_decode (keysym);

    if (amiga_keycode == -1) {
	switch (currprefs.keyboard_lang) {
	    case KBD_LANG_FR:
		amiga_keycode = decode_fr (keysym); break;
	    case KBD_LANG_US:
		amiga_keycode = decode_us (keysym); break;
	    case KBD_LANG_DE:
		amiga_keycode = decode_de (keysym); break;
	    case KBD_LANG_DK:
		amiga_keycode = decode_dk (keysym); break;
	    case KBD_LANG_SE:
		amiga_keycode = decode_se (keysym); break;
	    case KBD_LANG_IT:
		amiga_keycode = decode_it (keysym); break;
	    case KBD_LANG_ES:
		amiga_keycode = decode_es (keysym); break;
	    case KBD_LANG_FI:
		amiga_keycode = decode_fi (keysym); break;
	    case KBD_LANG_TR:
		amiga_keycode = decode_tr (keysym); break;
	    default:
			break;
	}
    }
    return amiga_keycode;
}
コード例 #2
0
ファイル: x11keys.c プロジェクト: Yamakuzure/PUAE
int32_t xkeysym2amiga (KeySym ks)
{
    int32_t as = kc_decode (ks);

    if (as == -1) {
	switch (currprefs.keyboard_lang) {
	    case KBD_LANG_FR:
		as = decode_fr (ks); break;
	    case KBD_LANG_US:
		as = decode_us (ks); break;
	    case KBD_LANG_DE:
		as = decode_de (ks); break;
	    case KBD_LANG_DK:
		as = decode_dk (ks); break;
	    case KBD_LANG_SE:
		as = decode_se (ks); break;
	    case KBD_LANG_IT:
		as = decode_it (ks); break;
	    case KBD_LANG_ES:
		as = decode_es (ks); break;
			case KBD_LANG_TR:
			as = decode_tr (ks); break;
			case KBD_LANG_FI:
			default:
			break;
	}
    }
    return as;
}