FreeBASIC  0.91.0
io_hinkey.c
Go to the documentation of this file.
1 #include "fb.h"
2 
3 /* Builds the string to be returned by the console/gfx inkey() functions */
5 {
6  FBSTRING *res;
7 
8  if( key > 0xFF ) {
9  /* 2-byte extended keycode */
10  res = fb_CHR( 2, (key & 0xFF), (key >> 8) );
11  } else {
12  res = fb_CHR( 1, key );
13  }
14 
15  return res;
16 }