Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

mck-800 keyboard

Posted on 2001-06-08
16
Medium Priority
?
653 Views
Last Modified: 2008-03-06
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.
0
Comment
Question by:f15iaf
  • 7
  • 4
  • 2
  • +2
16 Comments
 
LVL 12

Expert Comment

by:DRRYAN3
ID: 6168583
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.
0
 
LVL 63

Expert Comment

by:SysExpert
ID: 6168608
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 !
0
 
LVL 3

Author Comment

by:f15iaf
ID: 6168773
Sorry you'r links don't help i can't find the desired code
0
Sign your company up to try the MB 660 headset now

Take control and stay focused in noisy open office environments with the MB 660. By reducing background noise, you can revitalize your office and improve concentration.

 
LVL 12

Expert Comment

by:DRRYAN3
ID: 6168826
You are probably going to have to ask either the original manufacturer of the keyboard or the authors of the driver for this information.
0
 
LVL 1

Accepted Solution

by:
roaknog earned 200 total points
ID: 6169339
// This code does it in ms_dos mode.  To do it in windows you have to go to ring 0 which is differnet for Nt //versus 9x  Do you want code to do it, or an application, and for what os?

#include <conio.h>

void main(){
outp(0x60, 0xFF);
}
0
 
LVL 1

Expert Comment

by:roaknog
ID: 6169399
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
0
 
LVL 1

Expert Comment

by:roaknog
ID: 6169411
another application without the dll and sys file included
http://203.157.250.93/win32asm/files/AsmIO.zip
0
 
LVL 3

Author Comment

by:f15iaf
ID: 6169426
outp(0x60, 0xFF);
this code turn that light off how do i turn it on
0
 
LVL 3

Author Comment

by:f15iaf
ID: 6169427
outp(0x60, 0xFF);
this code turn that light off how do i turn it on
0
 
LVL 1

Expert Comment

by:roaknog
ID: 6169690
#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);
}
0
 
LVL 3

Author Comment

by:f15iaf
ID: 6169702
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.
0
 
LVL 14

Expert Comment

by:AvonWyss
ID: 6170431
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...
0
 
LVL 3

Author Comment

by:f15iaf
ID: 6170439
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.
0
 
LVL 14

Expert Comment

by:AvonWyss
ID: 6170440
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.
0
 
LVL 3

Author Comment

by:f15iaf
ID: 6170449
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.
0
 
LVL 3

Author Comment

by:f15iaf
ID: 6170450
num lock has nothing to do with that lamp
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question