f15iaf
asked on
mck-800 keyboard
this keyboard has a lamp besides scrol,caps and num lock
this lamp can be turned off or on by special programs.
I need a code to turn that lamp on and off.
Thanks.
this lamp can be turned off or on by special programs.
I need a code to turn that lamp on and off.
Thanks.
Found an NT driver for this keyboard through a google search. License file named Waytech Development as the author. Check their website at http://www.waytech.com for info.
This is a sophisticated keyboard control program.
http://www.zdnet.com/downloads/stories/info/0,,0000H6,.html
keyboard redefinition Dvorack, keyboard macros, numlock keylock change state etc
I hope this helps !
http://www.zdnet.com/downloads/stories/info/0,,0000H6,.html
keyboard redefinition Dvorack, keyboard macros, numlock keylock change state etc
I hope this helps !
ASKER
Sorry you'r links don't help i can't find the desired code
You are probably going to have to ask either the original manufacturer of the keyboard or the authors of the driver for this information.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
code for driver and dll for windows nt and 9x to get your ring 0:
http://www.internals.com/utilities/winio.zip
code for a vb application to send ports:
http://www.internals.com/utilities/VBDumpPort32.zip
http://www.internals.com/utilities/winio.zip
code for a vb application to send ports:
http://www.internals.com/utilities/VBDumpPort32.zip
another application without the dll and sys file included
http://203.157.250.93/win32asm/files/AsmIO.zip
http://203.157.250.93/win32asm/files/AsmIO.zip
ASKER
outp(0x60, 0xFF);
this code turn that light off how do i turn it on
this code turn that light off how do i turn it on
ASKER
outp(0x60, 0xFF);
this code turn that light off how do i turn it on
this code turn that light off how do i turn it on
#include<conio.h>
#include<stdio.h>
void main(){
printf("\n\n\tALL on bit 0 = scroll, bit 1 = num lock, bit 2 = cap lock.");
outp(0x60,0xed);
while(inp(0x64)&2);
outp(0x60, 0x07);
printf("\n\n\tHit enter key to turn all off");
getchar();
outp(0x60,0xed);
while(inp(0x64)&2);
outp(0x60, 0x00);
printf("\n\n\tHit enter key to turn only scroll on.");
getchar();
outp(0x60,0xed);
while(inp(0x64)&2);
outp(0x60, 0x01);
printf("\n\n\tHit enter key to turn only num lock on.");
getchar();
outp(0x60,0xed);
while(inp(0x64)&2);
outp(0x60, 0x02);
printf("\n\n\tHit enter key to turn only caps on.");
getchar();
outp(0x60,0xed);
while(inp(0x64)&2);
outp(0x60,0x04);
printf("\n\n\t\a(c)2001 INNIEA PUB. CO. R%c%cK NOG!\n\n\tThere are other more difficult ways to do this.\n", 153, 142);
}
#include<stdio.h>
void main(){
printf("\n\n\tALL on bit 0 = scroll, bit 1 = num lock, bit 2 = cap lock.");
outp(0x60,0xed);
while(inp(0x64)&2);
outp(0x60, 0x07);
printf("\n\n\tHit enter key to turn all off");
getchar();
outp(0x60,0xed);
while(inp(0x64)&2);
outp(0x60, 0x00);
printf("\n\n\tHit enter key to turn only scroll on.");
getchar();
outp(0x60,0xed);
while(inp(0x64)&2);
outp(0x60, 0x01);
printf("\n\n\tHit enter key to turn only num lock on.");
getchar();
outp(0x60,0xed);
while(inp(0x64)&2);
outp(0x60, 0x02);
printf("\n\n\tHit enter key to turn only caps on.");
getchar();
outp(0x60,0xed);
while(inp(0x64)&2);
outp(0x60,0x04);
printf("\n\n\t\a(c)2001 INNIEA PUB. CO. R%c%cK NOG!\n\n\tThere are other more difficult ways to do this.\n", 153, 142);
}
ASKER
Thanx first of all i've mentioned that there is another lamp besides caps scrol and num lock. i've tried all the values from 1 to 255 to find out the value
231-turns on
230-turns off
I don't use you'r dll file because it's enough to use outp function ,anyway i use delphi language which has a component to access the ports.
231-turns on
230-turns off
I don't use you'r dll file because it's enough to use outp function ,anyway i use delphi language which has a component to access the ports.
How about that:
SetKeyboardState
The SetKeyboardState function copies a 256-byte array of keyboard key states into the calling thread's keyboard input-state table. This is the same table accessed by the GetKeyboardState and GetKeyState functions. Changes made to this table do not affect keyboard input to any other thread.
BOOL SetKeyboardState(
LPBYTE lpKeyState // array of virtual-key codes
);
Parameters
lpKeyState
[in] Pointer to a 256-byte array that contains keyboard key states.
Return Values
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Remarks
Because the SetKeyboardState function alters the input state of the calling thread and not the global input state of the system, an application cannot use SetKeyboardState to set the NUM LOCK, CAPS LOCK, or SCROLL LOCK (or the Japanese KANA) indicator lights on the keyboard. These can be set or cleared using SendInput to simulate keystrokes.
Windows NT: The keybd_event function can also toggle the NUM LOCK, CAPS LOCK, and SCROLL LOCK keys.
Windows 95: The keybd_event function can toggle only the CAPS LOCK and SCROLL LOCK keys. It cannot toggle the NUM LOCK key.
Requirements
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Winuser.h; include Windows.h.
Library: Use User32.lib.
See Also
Keyboard Input Overview, Keyboard Input Functions, GetAsyncKeyState, GetKeyboardState, GetKeyState, keybd_event, MapVirtualKey, SendInput
So, just call this API function...
SetKeyboardState
The SetKeyboardState function copies a 256-byte array of keyboard key states into the calling thread's keyboard input-state table. This is the same table accessed by the GetKeyboardState and GetKeyState functions. Changes made to this table do not affect keyboard input to any other thread.
BOOL SetKeyboardState(
LPBYTE lpKeyState // array of virtual-key codes
);
Parameters
lpKeyState
[in] Pointer to a 256-byte array that contains keyboard key states.
Return Values
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Remarks
Because the SetKeyboardState function alters the input state of the calling thread and not the global input state of the system, an application cannot use SetKeyboardState to set the NUM LOCK, CAPS LOCK, or SCROLL LOCK (or the Japanese KANA) indicator lights on the keyboard. These can be set or cleared using SendInput to simulate keystrokes.
Windows NT: The keybd_event function can also toggle the NUM LOCK, CAPS LOCK, and SCROLL LOCK keys.
Windows 95: The keybd_event function can toggle only the CAPS LOCK and SCROLL LOCK keys. It cannot toggle the NUM LOCK key.
Requirements
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Winuser.h; include Windows.h.
Library: Use User32.lib.
See Also
Keyboard Input Overview, Keyboard Input Functions, GetAsyncKeyState, GetKeyboardState, GetKeyState, keybd_event, MapVirtualKey, SendInput
So, just call this API function...
ASKER
Setkeyboard state has nothing to do with that lamp and there is no virtual key for that lamp.
num caps and scroll lock have no relation to that lamp.
num caps and scroll lock have no relation to that lamp.
Sorry, got the wrong call. This API here will toggle the lights:
keybd_event
The keybd_event function synthesizes a keystroke. The system can use such a synthesized keystroke to generate a WM_KEYUP or WM_KEYDOWN message. The keyboard driver's interrupt handler calls the keybd_event function.
Windows NT/2000: This function has been superseded. Use SendInput instead.
VOID keybd_event(
BYTE bVk, // virtual-key code
BYTE bScan, // hardware scan code
DWORD dwFlags, // function options
ULONG_PTR dwExtraInfo // additional keystroke data
);
Parameters
bVk
[in] Specifies a virtual-key code. The code must be a value in the range 1 to 254. For a complete list, see Virtual-Key Codes.
bScan
This parameter is not used.
dwFlags
[in] Specifies various aspects of function operation. This parameter can be one or more of the following values. Value Meaning
KEYEVENTF_EXTENDEDKEY If specified, the scan code was preceded by a prefix byte having the value 0xE0 (224).
KEYEVENTF_KEYUP If specified, the key is being released. If not specified, the key is being depressed.
dwExtraInfo
[in] Specifies an additional value associated with the key stroke.
Return Values
This function has no return value.
Remarks
An application can simulate a press of the PRINTSCRN key in order to obtain a screen snapshot and save it to the clipboard. To do this, call keybd_event with the bVk parameter set to VK_SNAPSHOT.
Windows NT: The keybd_event function can toggle the NUM LOCK, CAPS LOCK, and SCROLL LOCK keys.
Windows 95: The keybd_event function can toggle only the CAPS LOCK and SCROLL LOCK keys. It cannot toggle the NUM LOCK key.
The following sample program toggles the NUM LOCK light (on Windows NT only) by using keybd_event() with a virtual key of VK_NUMLOCK. It takes a Boolean value that indicates whether the light should be turned off (FALSE) or on (TRUE). The same technique can be used for the CAPS LOCK key (VK_CAPITAL) and the SCROLL LOCK key (VK_SCROLL).
#include <windows.h>
void SetNumLock( BOOL bState )
{
BYTE keyState[256];
GetKeyboardState((LPBYTE)& keyState);
if( (bState && !(keyState[VK_NUMLOCK] & 1)) ||
(!bState && (keyState[VK_NUMLOCK] & 1)) )
{
// Simulate a key press
keybd_event( VK_NUMLOCK,
0x45,
KEYEVENTF_EXTENDEDKEY | 0,
0 );
// Simulate a key release
keybd_event( VK_NUMLOCK,
0x45,
KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP,
0);
}
}
void main()
{
SetNumLock( TRUE );
}
Requirements
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Winuser.h; include Windows.h.
Library: Use User32.lib.
See Also
Keyboard Input Overview, Keyboard Input Functions, GetAsyncKeyState, GetKeyState, keybd_event, MapVirtualKey, SetKeyboardState
Sorry for posting the wrong API before.
keybd_event
The keybd_event function synthesizes a keystroke. The system can use such a synthesized keystroke to generate a WM_KEYUP or WM_KEYDOWN message. The keyboard driver's interrupt handler calls the keybd_event function.
Windows NT/2000: This function has been superseded. Use SendInput instead.
VOID keybd_event(
BYTE bVk, // virtual-key code
BYTE bScan, // hardware scan code
DWORD dwFlags, // function options
ULONG_PTR dwExtraInfo // additional keystroke data
);
Parameters
bVk
[in] Specifies a virtual-key code. The code must be a value in the range 1 to 254. For a complete list, see Virtual-Key Codes.
bScan
This parameter is not used.
dwFlags
[in] Specifies various aspects of function operation. This parameter can be one or more of the following values. Value Meaning
KEYEVENTF_EXTENDEDKEY If specified, the scan code was preceded by a prefix byte having the value 0xE0 (224).
KEYEVENTF_KEYUP If specified, the key is being released. If not specified, the key is being depressed.
dwExtraInfo
[in] Specifies an additional value associated with the key stroke.
Return Values
This function has no return value.
Remarks
An application can simulate a press of the PRINTSCRN key in order to obtain a screen snapshot and save it to the clipboard. To do this, call keybd_event with the bVk parameter set to VK_SNAPSHOT.
Windows NT: The keybd_event function can toggle the NUM LOCK, CAPS LOCK, and SCROLL LOCK keys.
Windows 95: The keybd_event function can toggle only the CAPS LOCK and SCROLL LOCK keys. It cannot toggle the NUM LOCK key.
The following sample program toggles the NUM LOCK light (on Windows NT only) by using keybd_event() with a virtual key of VK_NUMLOCK. It takes a Boolean value that indicates whether the light should be turned off (FALSE) or on (TRUE). The same technique can be used for the CAPS LOCK key (VK_CAPITAL) and the SCROLL LOCK key (VK_SCROLL).
#include <windows.h>
void SetNumLock( BOOL bState )
{
BYTE keyState[256];
GetKeyboardState((LPBYTE)&
if( (bState && !(keyState[VK_NUMLOCK] & 1)) ||
(!bState && (keyState[VK_NUMLOCK] & 1)) )
{
// Simulate a key press
keybd_event( VK_NUMLOCK,
0x45,
KEYEVENTF_EXTENDEDKEY | 0,
0 );
// Simulate a key release
keybd_event( VK_NUMLOCK,
0x45,
KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP,
0);
}
}
void main()
{
SetNumLock( TRUE );
}
Requirements
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Winuser.h; include Windows.h.
Library: Use User32.lib.
See Also
Keyboard Input Overview, Keyboard Input Functions, GetAsyncKeyState, GetKeyState, keybd_event, MapVirtualKey, SetKeyboardState
Sorry for posting the wrong API before.
ASKER
You can't turn on that lamp with key stroke that lamp can be turned on only with special programs such as mail checker designed specialy for this keyboard.
This lamp is not like scrol,num and caps lock lamps.
This lamp is not like scrol,num and caps lock lamps.
ASKER
num lock has nothing to do with that lamp