Browse Prior Art Database

Disabling Hot Keys

IP.com Disclosure Number: IPCOM000105086D
Original Publication Date: 1993-Jun-01
Included in the Prior Art Database: 2005-Mar-19
Document File: 4 page(s) / 145K

Publishing Venue

IBM

Related People

Beck, J: AUTHOR [+2]

Abstract

System hot keys may be disabled in IBM's OS/2* full screen and Presentation Manager* screen groups. An OS/2 keyboard monitor applica- tion and appropriate function calls to the OS/2 keyboard device driver interact with one another to halt the actions of the OS/2 hot key combinations.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 26% of the total text.

Disabling Hot Keys

      System hot keys may be disabled in IBM's OS/2* full screen and
Presentation Manager* screen groups.  An OS/2 keyboard monitor
applica- tion and appropriate function calls to the OS/2 keyboard
device driver interact with one another to halt the actions of the
OS/2 hot key combinations.

  Hot Key                    Action

o   Crtl+Alt+Del             System Boot
o   Ctrl+Alt+NumLock         System Dump
o   Ctrl+Esc                 Show Task List
o   Alt+Esc                  Switch Sessions

      OS/2 is a multitasking operating system.  Each task may execute
in one of 16 screen groups, or different display screens.  OS/2
Presenta- tion Manager (PM) occupies one of the screen groups.  Most
hot keys are processed by the keyboard device driver in all screen
groups.  When the PM screen group is in the foreground, however, the
Ctrl+Esc and Alt+Esc hot keys are ignored by the keyboard device
driver and are instead processed by PM.  This implies that two
methods are needed to disable the actions of hot keys; one method
that disables Ctrl+Esc and Alt+Esc in PM, and another that disables
the hot key processing by the keyboard device driver.

      Disabling the keyboard device driver's hot key processing may
be accomplished by using the OS/2 system call DosDevIOCtl to pass
device- control functions to the keyboard device driver.  The
specific DosDevIOCtl subfunction made is KBD_SETSESMGRHOTKEY, from
the category 4 keyboard functions.  The id of the hot key to set is
FFFF in hexa- decimal.  This function call toggles the keyboard
device driver's hot key processing on and off.  The hot keys disabled
are:

o     Ctrl+Alt+Del
o     Ctrl+Alt+NumLock
o     Ctrl+Esc
o     Alt+Esc

      The following pseudocode shows how to disable and enable
keyboard device driver hot key processing.
typedef struct _HOTKEY {
        USHORT fsHotKey;              // hot key modifier
        UCHAR  uchScancodeMake;       // scan code of hot key pressed
        UCHAR  uchScancodeBreak;      // scan code of hot key
released
        USHORT idHotKey;             // hot key identifier
        }  HOTKEY;
typedef HOTKEY FAR * PHOTKEY;

USHORT  usAction;                     // temporary variable
HFILE   hKbd;                         // keyboard device handle
HOTKEY  hotkey;                       // hot key structure

// get access to send commands to the keyboard device driver

DosOpen ( "KBD$",                   // name of the keyboard device
                                       driver
         &hKbd,                    //  get handle to represent the
                                 ...