General Terminal

GtIsNumLock

Check whether Num Lock is on

Syntax

Signature
xBool GtIsNumLock( void );

Arguments

No arguments.

Return value

T if Num Lock is on, otherwise F.

Description

Uses the Num Lock bit in the driver’s keyboard state. System-level changes depend on driver support.

Example

gtisnumlock.c
#include "xdev-wtui.h"

#include <stdio.h>

int main( void )
{
   printf( "Num Lock state: %s\n", GtIsNumLock() ? "on" : "off" );

   return 0;
}

See also