Feel free to.

Here you go.

Best regards,
Chris.
59a60
>         "toggle - toggles the NumLock on and off in X\n"
132a134,151
> 
> int xkb_toggle()
>     {
>     unsigned int mask;
>     unsigned int numlockState;
>               XkbStateRec xkbState;
>     if( !xkb_init())
>         return 0;
>     mask = xkb_numlock_mask();
>     if( mask == 0 )
>         return 0;
>               XkbGetState( dpy, XkbUseCoreKbd, &xkbState);
>               numlockState = xkbState.locked_mods & mask;
>               if (numlockState) XkbLockModifiers ( dpy, XkbUseCoreKbd, mask, 
> 0);
>               else XkbLockModifiers ( dpy, XkbUseCoreKbd, mask, mask);
>     return 1;
>     }
>     
176a196,200
> 
> void xtest_toggle()
>     {
>     xtest_change_numlock();
>     }
200a225,235
> void numlock_toggle()
>     {
> #ifdef HAVE_XKB
>     if( xkb_toggle())
>         return;
> #endif
> #ifdef HAVE_XTEST
>     xtest_toggle();
> #endif
>     }
> 
211a247
>         usage( argv[ 0 ] );
219a256,257
>     else if( strcmp( argv[ 1 ], "toggle" ) == 0 )
>         numlock_toggle();

Reply via email to