input/keyboard/keyboard_stdin/source/keymain.c

#include <nds.h>
#include <stdio.h>


void OnKeyPressed(int key) {
   if(key > 0)
      iprintf("%c", key);
}

int main(void)  {

   consoleDemoInit();

   Keyboard *kbd =      keyboardDemoInit();

   kbd->OnKeyPressed = OnKeyPressed;

   while(1) {
      char myName[256];

      iprintf("What is your name?\n");

      scanf("%s", myName);

      iprintf("\nHello %s", myName);

      scanKeys();
      while(!keysDown())scanKeys();

      swiWaitForVBlank();
      consoleClear();
   }

   return 0;
}
 全て クラス ファイル 関数 変数 型定義 列挙型 列挙型の値 マクロ定義
libndsに対してMon Apr 26 23:39:49 2010に生成されました。  doxygen 1.6.3