General Terminal

GtSetNumLock

Change the Num Lock state

Syntax

Signature
void GtSetNumLock( xBool on );

Arguments

on enables the setting with T or disables it with F.

Return value

No return value.

Description

Uses the Num Lock bit in the driver’s keyboard state. System-level changes depend on driver support. Check the resulting state with GtIsNumLock().

Example

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

#include <stdio.h>

int main( void )
{
   xBool previous = GtIsNumLock();

   GtSetNumLock( T );
   printf( "Num Lock state: %s\n", GtIsNumLock() ? "on" : "off" );
   GtSetNumLock( previous );

   return 0;
}

See also