Retro Rocket Kernel
BASIC-Powered Operating System
keyboard.h File Reference

Enumerations

enum  extended_key_t {
  KEY_PAGEUP = 245 , KEY_PAGEDOWN = 246 , KEY_DEL = 247 , KEY_INS = 248 ,
  KEY_END = 249 , KEY_UP = 250 , KEY_DOWN = 251 , KEY_LEFT = 252 ,
  KEY_RIGHT = 253 , KEY_HOME = 254
}
 Extended keys. BASIC reports these keypresses directly via INKEY$. More...
 

Functions

void init_keyboard ()
 Claim keyboard interrupt. More...
 
unsigned char kgetc (console *cons)
 Returns next key in circular buffer, or 255 if no key available. More...
 
bool ctrl_held ()
 Returns true if the CTRL key is held down. More...
 
bool shift_held ()
 Returns true if the SHIFT key is held down. More...
 
bool alt_held ()
 Returns true if the ALT key is held down. More...
 
bool caps_lock_on ()
 Returns true if the CAPS LOCK key is enganged. More...
 

Detailed Description

Author
Craig Edwards (craig.nosp@m.edwa.nosp@m.rds@b.nosp@m.rain.nosp@m.box.c.nosp@m.c)

Enumeration Type Documentation

◆ extended_key_t

Extended keys. BASIC reports these keypresses directly via INKEY$.

Enumerator
KEY_PAGEUP 
KEY_PAGEDOWN 
KEY_DEL 
KEY_INS 
KEY_END 
KEY_UP 
KEY_DOWN 
KEY_LEFT 
KEY_RIGHT 
KEY_HOME 

Function Documentation

◆ alt_held()

bool alt_held ( )

Returns true if the ALT key is held down.

Returns
true if ALT key held

◆ caps_lock_on()

bool caps_lock_on ( )

Returns true if the CAPS LOCK key is enganged.

Returns
true if CAPS LOCK is on

◆ ctrl_held()

bool ctrl_held ( )

Returns true if the CTRL key is held down.

Returns
true if CTRL key held

◆ init_keyboard()

void init_keyboard ( )

Claim keyboard interrupt.

◆ kgetc()

unsigned char kgetc ( console cons)

Returns next key in circular buffer, or 255 if no key available.

Parameters
conscurrent console
Returns
unsigned char key from circular buffer

◆ shift_held()

bool shift_held ( )

Returns true if the SHIFT key is held down.

Returns
true if SHIFT key held