Seed7 - The extensible programming language
Seed7 FAQ Manual Screenshots Examples Libraries Algorithms Download Links
Libraries AES ARC4 Array ASN.1 Bigfile Bigint Bigrat Bin32 Bin64 Bitdata Bitmapfont Bitset Bitsetof Boolean Browser Bstring Bytedata Cards Category CC config Cgi Cgi dialog Char Charsets Cipher Clib_file Color CLI Commands Complex Console Crc32 Deflate DES Dialog Dir Draw Duration Echo Editline Enable_input Enable_io Enable_output Encoding Environment External_file File File system Float Font Forloop Ftp Getf Gethttp Gethttps Graph Graph_file Gzip Hash Hashsetof Hmac Html_ent Httpserv Idxarray Image Inflate Inflate file Inifile Integer Keybd Line Listener LZW Make Math Msgdigest Null_file Osfiles Picture utility Pixmap_file Pixmapfont PKCS #1 Poll Process Progs Propertyfile Rational Reference Ref_list Scanfile Scanstri Set Shell Smtp Sockbase Socket SQL base Stdio Strifile String Stritext Subrange Tar Text Time TLS/SSL Triple DES Unicode Utf16 Utf8 Vectorfont 3D Vector Window Wrinum X.509 Xmldom Xml_ent Zip
Libraries
Keybd Source Code
 previous   up   next 

Types
keyboard_file
Interface type describing keyboard files.

keyboard_file

const type: keyboard_file

Interface type describing keyboard files. This interface is implemented with console_keybd_file and graph_keybd_file.


Variable Summary
console_keybd_file
CONSOLE_KEYBOARD
Keyboard file describing the console keyboard.
graph_keybd_file
GRAPH_KEYBOARD
Keyboard file describing the graphic keyboard.
keyboard_file
KEYBOARD
Variable describing the keyboard.

Function Summary
char
busy_getc (in keyboard_file: keybd)
Read a char from keybd, but don't wait when no key was pressed.
boolean
keypressed (in keyboard_file: keybd)
Determine if at least one character can be read without waiting.
boolean
buttonPressed (in keyboard_file: keybd, in char: button)
Determine if a given button is currently pressed.
integer
getxpos (in keyboard_file: keybd)
X position of the mouse cursor when a button was pressed.
integer
getypos (in keyboard_file: keybd)
Y position of the mouse cursor when a button was pressed.
char
getc (in console_keybd_file: keybd)
Read a character from the console keyboard file.
string
gets (in console_keybd_file: keybd, in integer: maxLength)
Read a string with maximum length from the console keyboard file.
char
busy_getc (in console_keybd_file: keybd)
Read a char from keybd, but don't wait when no key was pressed.
boolean
keypressed (in console_keybd_file: keybd)
Determine if at least one character can be read without waiting.
string
getwd (inout console_keybd_file: keybd)
Read a word from the console keyboard file.
string
getln (inout console_keybd_file: keybd)
Read a line from the console keyboard file.
char
getc (in graph_keybd_file: keybd)
Read a character from the graphic keyboard file.
string
gets (in graph_keybd_file: keybd, in integer: maxLength)
Read a string with maximum length from the graphic keyboard file.
boolean
buttonPressed (in graph_keybd_file: keybd, in char: button)
Determine if a given button is currently pressed.
integer
getxpos (in graph_keybd_file: keybd)
X position of the mouse cursor when a button was pressed.
integer
getypos (in graph_keybd_file: keybd)
Y position of the mouse cursor when a button was pressed.
char
busy_getc (in graph_keybd_file: keybd)
Read a char from keybd, but don't wait when no key was pressed.
boolean
keypressed (in graph_keybd_file: keybd)
Determine if at least one character can be read without waiting.
string
getwd (inout graph_keybd_file: keybd)
Read a word from the graphic keyboard file.
string
getln (inout graph_keybd_file: keybd)
Read a line from the graphic keyboard file.

Variable Detail

CONSOLE_KEYBOARD

var console_keybd_file: CONSOLE_KEYBOARD

Keyboard file describing the console keyboard. The console keyboard belongs to a text/console window. Characters typed at the keyboard are queued (first in first out) and can be read directly, without the need to press ENTER or RETURN. There is also no possibility to correct a key, once it is pressed. Additionally KEYBOARD does not echo the characters.


GRAPH_KEYBOARD

var graph_keybd_file: GRAPH_KEYBOARD

Keyboard file describing the graphic keyboard. The graphic keyboard belongs to a graphic window. Characters typed at the keyboard are queued (first in first out) and can be read directly, without the need to press ENTER or RETURN. There is also no possibility to correct a key, once it is pressed. Additionally KEYBOARD does not echo the characters.


KEYBOARD

var keyboard_file: KEYBOARD

Variable describing the keyboard. Characters typed at the keyboard are queued (first in first out) and can be read directly, without the need to press ENTER or RETURN. There is also no possibility to correct a key, once it is pressed. Additionally KEYBOARD does not echo the characters. This variable is initialized with CONSOLE_KEYBOARD. When a program wants to work with the graphic keyboard, the following assignment is necessary:

KEYBOARD := GRAPH_KEYBOARD;

Function Detail

busy_getc

const func char: busy_getc (in keyboard_file: keybd)

Read a char from keybd, but don't wait when no key was pressed.

Returns:
the char read from keybd or KEY_NONE when no char is available.

keypressed

const func boolean: keypressed (in keyboard_file: keybd)

Determine if at least one character can be read without waiting.

Returns:
TRUE if a character is available at keybd, FALSE otherwise.

buttonPressed

const func boolean: buttonPressed (in keyboard_file: keybd, in char: button)

Determine if a given button is currently pressed.

Returns:
TRUE when button is currently pressed, FALSE otherwise.

getxpos

const func integer: getxpos (in keyboard_file: keybd)

X position of the mouse cursor when a button was pressed. The functions getxpos and getypos can be used to determine which position was "clicked".

Returns:
the X position of the mouse cursor at the time when the last button was pressed.

getypos

const func integer: getypos (in keyboard_file: keybd)

Y position of the mouse cursor when a button was pressed. The functions getxpos and getypos can be used to determine which position was "clicked".

Returns:
the Y position of the mouse cursor at the time when the last button was pressed.

getc

const func char: getc (in console_keybd_file: keybd)

Read a character from the console keyboard file.

Returns:
the character read.

gets

const func string: gets (in console_keybd_file: keybd, in integer: maxLength)

Read a string with maximum length from the console keyboard file.

Returns:
the string read.

busy_getc

const func char: busy_getc (in console_keybd_file: keybd)

Read a char from keybd, but don't wait when no key was pressed.

Returns:
the char read from the console keyboard file or KEY_NONE when no char is available.

keypressed

const func boolean: keypressed (in console_keybd_file: keybd)

Determine if at least one character can be read without waiting.

Returns:
TRUE if a character is available at the console keyboard file FALSE otherwise.

getwd

const func string: getwd (inout console_keybd_file: keybd)

Read a word from the console keyboard file. Before reading the word it skips spaces and tabs. The function accepts words ending with " ", "\t", "\n", "\r\n" or EOF. The word ending characters are not copied into the string. That means that the "\r" of a "\r\n" sequence is silently removed. When the function is left keybd.bufferChar contains ' ', '\t', '\n' or EOF.

Returns:
the word read.

getln

const func string: getln (inout console_keybd_file: keybd)

Read a line from the console keyboard file. The function accepts lines ending with "\n", "\r\n" or EOF. The line ending characters are not copied into the string. That means that the "\r" of a "\r\n" sequence is silently removed. When the function is left keybd.bufferChar contains '\n' or EOF.

Returns:
the line read.

getc

const func char: getc (in graph_keybd_file: keybd)

Read a character from the graphic keyboard file.

Returns:
the character read.

gets

const func string: gets (in graph_keybd_file: keybd, in integer: maxLength)

Read a string with maximum length from the graphic keyboard file.

Returns:
the string read.

buttonPressed

const func boolean: buttonPressed (in graph_keybd_file: keybd, in char: button)

Determine if a given button is currently pressed.

Returns:
TRUE when button is currently pressed, FALSE otherwise.

getxpos

const func integer: getxpos (in graph_keybd_file: keybd)

X position of the mouse cursor when a button was pressed. The functions getxpos and getypos can be used to determine which position was "clicked".

Returns:
the X position of the mouse cursor at the time when the last button was pressed.

getypos

const func integer: getypos (in graph_keybd_file: keybd)

Y position of the mouse cursor when a button was pressed. The functions getxpos and getypos can be used to determine which position was "clicked".

Returns:
the Y position of the mouse cursor at the time when the last button was pressed.

busy_getc

const func char: busy_getc (in graph_keybd_file: keybd)

Read a char from keybd, but don't wait when no key was pressed.

Returns:
the char read from the graphic keyboard file or KEY_NONE when no char is available.

keypressed

const func boolean: keypressed (in graph_keybd_file: keybd)

Determine if at least one character can be read without waiting.

Returns:
TRUE if a character is available at the graphic keyboard file FALSE otherwise.

getwd

const func string: getwd (inout graph_keybd_file: keybd)

Read a word from the graphic keyboard file. Before reading the word it skips spaces and tabs. The function accepts words ending with " ", "\t", "\n", "\r\n" or EOF. The word ending characters are not copied into the string. That means that the "\r" of a "\r\n" sequence is silently removed. When the function is left keybd.bufferChar contains ' ', '\t', '\n' or EOF.

Returns:
the word read.

getln

const func string: getln (inout graph_keybd_file: keybd)

Read a line from the graphic keyboard file. The function accepts lines ending with "\n", "\r\n" or EOF. The line ending characters are not copied into the string. That means that the "\r" of a "\r\n" sequence is silently removed. When the function is left keybd.bufferChar contains '\n' or EOF.

Returns:
the line read.


 previous   up   next