Solved

mck-800 keyboard

Posted on 2001-06-08
16
627 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
Comment Utility
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
Comment Utility
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
Comment Utility
Sorry you'r links don't help i can't find the desired code
0
 
LVL 12

Expert Comment

by:DRRYAN3
Comment Utility
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 100 total points
Comment Utility
// 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
Comment Utility
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
Comment Utility
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
Comment Utility
outp(0x60, 0xFF);
this code turn that light off how do i turn it on
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 3

Author Comment

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

Expert Comment

by:roaknog
Comment Utility
#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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
num lock has nothing to do with that lamp
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

The Rasberry PI is a low cost piece of hardware that you can have a lot of fun with through experimenting and building/working on projects like media players, running a low cost computer, build data loggers etc. - see: https://www.raspberrypi.org
Does your iMac really need a hardware upgrade? Will upgrading RAM speed-up your computer? If yes, then how can you proceed? Upgrading RAM in your iMac is not as simple as it may seem. This article will help you in getting and installing right RA…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now