Next: xkeyboard
Up: simxlib
Previous: xcursor
x_keyboard
NAME
x_keyboard - part of Simula to Xlib interface
DESCRIPTION
Xlib_Keyboard class X_Keyboard(Display);
ref (Xlib_Display) Display;
Controls for modifying the keyboard charcteristics. Objects
of class XKeyboardState are returned by procedure
GetKeyboardControl.
SUPERS: Xlib_Keyboard;
KIND: Subclassable;
INIT: Initilizes itself;
Sequencing: (SetKeyClickPercent/SetBellPercent/SetBellPitch/
: SetBellDuration/SetLed/SetAllLeds/SetKeyAutoRepeat/
: AutoRepeatOff/AutoRepeatOn/AutoRepeatDefault/Bell/
: GetKeyboardControl/QueryKeymap/KeycodeToKeysym/
: KeysymToKeycode/RebindKeysym/KeysymToString/
: DisplayKeycodes)*
OPERATIONS
SetKeyClickPercent
procedure SetKeyClickPercent(Percent);
integer Percent; ! 0(off) ... 100(loud), -1=restore
default.;
Sets the volume for key clicks A value between 0 (off) and
100 (loud) inclusive. -1 restores the default.
SetBellPercent
procedure SetBellPercent(Percent);
integer Percent; ! 0(off) ... 100(loud), -1=restore
default.;
Sets the base volume for the bell. A value between 0 (off)
and 100 (loud) inclusive. -1 restores the default.
SetBellPitch
procedure SetBellPitch(Pitch);
integer Pitch; ! in Hz, -1=restore default.;
Sets the pitch (specified in Hz) of the bell. Setting to -1
restores the default.
SetBellDuration
procedure SetBellDuration(Duration);
integer Duration; ! in milliseconds, -1=restore default.;
Sets the duration (specified in millisecons) of the bell.
Setting to -1 restores the default.
SetLed
procedure SetLed(LedNbr,LedMode);
integer LedNbr; ! 1,2,3,4, ... 32 ;
integer LedMode; ! LedModeOn or LedModeOff - attributes
of this class;
Sets the light specified by LedNbr (1-32) to the state
specified by LedMode. Possible values for LedMode is
LedModeOn or LedModeOff.
SetAllLeds
procedure SetAllLeds(LedMode);
integer LedMode; ! LedModeOn or LedModeOff - attributes
of this class;
Sets all light's state to LedMode. Possible values for
LedMode is LedModeOn or LedModeOff.
SetKeyAutoRepeat
procedure SetKeyAutoRepeat(KeyNbr,RepeatMode);
integer KeyNbr; ! Keycode - 7,...255;
integer RepeatMode; ! AutoRepeatMode(On/Off/Default) ;
Sets the auto-repeat mode for a specified key. KeyNbr is a
keycode between 7 and 255 inclusive. Possible values for
RepeatMode is AutoRepeatModeOn, AutoRepeatModeOff, or
AutoRepeatModeDefault. These constants are attributes of
this class.
AutoRepeatOff
procedure AutoRepeatOff;
Turns off auto-repeat for the keyboard. It sets the keyboard
so that holding a non-modal key down will not result in
multiple events.
AutoRepeatOn
procedure AutoRepeatOn;
Sets the keyboard to auto-repeat - that is, holding any
non-modal key down will result in multiple events.
AutoRepeatDefault
procedure AutoRepeatDefault;
Sets the keyboard to it's default auto-repeat.
Bell
procedure Bell(Percent);
integer Percent; ! -100(off) ... 0 ... 100 (LOUD);
Rings the bell on the keyboard at a volume relative to the
base volume. Possible values are -100 (off), through 0
(base volume), to 100 (loudest) inclusive.
GetKeyboardControl
ref(XKeyboardState) procedure GetKeyboardControl;
Returns information about the state of the keyboard. For
more information see XKeyboardState.
QueryKeymap
ref(BitSetClass) procedure QueryKeymap;
Returns a bit vector for the logical state of the keyboard,
where each bit set indicates that the corresponding key is
currently pressed down.
KeycodeToKeysym
integer procedure KeycodeToKeysym(KeyCode,Index);
integer KeyCode;
integer Index;
Returns one of the keysyms defined for a specified keycode.
Index specifies which keysym in the array of keysyms
corresponding to a keycode should be returned.
KeysymToKeycode
integer procedure KeysymToKeycode(Keysym);
integer Keysym;
Returns the keycode corresponding to the specified keysym in
the current mapping.
RebindKeysym
procedure
RebindKeysym(Keysym,Modifiers,NbrOfModifiers,String);
integer Keysym;
integer NbrOfModifiers;
integer array Modifiers; ! Contains keysyms for the keys
that are being used as modifiers;
text String;
Bind the ASCII string to the specified keysym, so that
string and keysym are returned by XLookupString when that
key is pressed and the modifiers specified in Modifiers are
also held down.
KeysymToString
text procedure KeysymToString(Keysym);
integer Keysym;
Converts a keysym symbol into a character string.
DisplayKeycodes
procedure DisplayKeycodes(xmin_return, xmax_return);
name xmin_return,xmax_return;
integer xmin_return; ! value between 8 ... 255;
integer xmax_return; ! value between 8 ... 255;
Returns the 'xmin_return' and 'xmax_return' supported by the
current server. The minimum keycode returned is never less
than 8, and max 255.