Exemplo n.º 1
0
//---------------------------------------------------------------------------------
int main(void) {
//---------------------------------------------------------------------------------
	consoleDemoInit();  //setup the sub screen for printing

	keyboardDemoInit();

	keyboardShow();

	while(1) {
		
		int key = keyboardUpdate();

		if(key > 0)
			iprintf("%c", key);

		swiWaitForVBlank();
		scanKeys();

		int pressed = keysDown();

		if(pressed & KEY_START) break;
	}

	return 0;
}
Exemplo n.º 2
0
void App_frame() {

	int key = keyboardUpdate();

	if (key > 0) {
		putchar(key);
		Port2_send(key);
	}
}
Exemplo n.º 3
0
LOCALPROC DS_HandleKeyboard(void)
{
	LastKeyboardKey = KeyboardKey;
	KeyboardKey = keyboardUpdate();

	if ((KeyboardKey == NOKEY) && (LastKeyboardKey != NOKEY)) {
		DS_HandleKey(LastKeyboardKey, falseblnr);
		LastKeyboardKey = NOKEY;
	} else {
		DS_HandleKey(KeyboardKey, trueblnr);
		LastKeyboardKey = KeyboardKey;
	}
}
Exemplo n.º 4
0
void I_StartTic (void) {
	if(saveStringEnter) {
		int key = keyboardUpdate();
		scanKeys();
		u16 keys = keysDown();
		if (keys & KEY_A) key = 10;
		if (keys & KEY_B) key = KEYD_ESCAPE;
		event_t event;
		event.type = ev_keydown;
		event.data1 = key;
		D_PostEvent(&event);

	} else {
		DS_Controls();
	}
}
Exemplo n.º 5
0
//---------------------------------------------------------------------------------
int main(void) {
//---------------------------------------------------------------------------------
	consoleDemoInit();  //setup the sub screen for printing

	keyboardDemoInit();

	keyboardShow();

	while(1) {
		
		int key = keyboardUpdate();

		if(key > 0)
			iprintf("%c", key);

		swiWaitForVBlank();
	}

	return 0;
}
Exemplo n.º 6
0
void ConsoleKeyboardState::updateState(const touchPosition &touch)
{
  int key = keyboardUpdate();
  if (key > 0)
    iprintf("%c", key);
}