logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

KeyMap - activates controls given their keyboard equivalents

Description

       KeyMap  supports  keyboard  equivalents,  which  allow  the user of a Unidraw application to execute menu
       commands or select from a palette of controls by typing rather than pointing and clicking with the mouse.
       The KeyMap can activate a control given its key code as defined by its ControlInfo  object.   Only  those
       controls  registered  with  the  KeyMap can be activated through the KeyMap.  By default, the Editor base
       class handles key events by having its KeyMap execute the key code.

Name

       KeyMap - activates controls given their keyboard equivalents

Public Operations

KeyMap()
              Construct a new keymap, initially with no registrants.

       voidRegister(UControl*)voidRegister(KeyMap*)voidUnregister(UControl*)voidUnregister(KeyMap*)
              Register and unregister a control or another  KeyMap.   Registering  a  KeyMap  is  equivalent  to
              registering all its registered controls individually.

       voidExecute(constchar*keyCode)
              Execute  the  given  key  code  by activating the corresponding control.  Each UControl contains a
              ControlInfo object that specifies its key code; thus the mapping between key codes and controls is
              defined by the ControlInfo objects collectively.  Key codes among registered  controls  should  be
              unique.

See Also

ControlInfo(3U), KeyMap(3U), UControl(3U), kybd(3U)

Unidraw                                           1 August 1990                                       KeyMap(3U)

Synopsis

#include<Unidraw/keymap.h>

See Also