updating oE key_codes


include console.e 
namespace console 
public function key_codes(object codes = 0) 

gets and sets the keyboard codes used internally by Euphoria.

  1. codes : Either a sequence of exactly 256 integers or an atom (the default).

A sequence, of the current 256 keyboard codes, prior to any changes that this function might make.


When codes is a atom then no change to the existing codes is made, otherwise the set of 256 integers in codes completely replaces the existing codes.

Example 1:
include std/console.e 
sequence kc 
kc = key_codes() -- Get existing set. 
kc[KC_LEFT] = 263 -- Change the code for the left-arrow press. 
key_codes(kc) -- Set the new codes. 

Key Code Names

These are the names of the index values for each of the 256 key code values.

See Also:


Not Categorized, Please Help


Quick Links

User menu

Not signed in.

Misc Menu