Solved

mck-800 keyboard

Posted on 2001-06-08
16
632 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
 
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 100 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
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 
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

Free camera licenses with purchase of My Cloud NAS

Milestone Arcus software is compatible with thousands of industry-leading cameras for added flexibility. Upon installation on your My Cloud NAS, you will receive two (2) camera licenses already enabled in the software. And for a limited time, get additional camera licenses FREE.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
strings to secure devices 8 73
Rubber hose 5 74
Boot to external harddrive (has bootable windows 10 image on it) via USB 5 82
BIOS Flasher Utility problem 5 39
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 paper addresses the security of Sennheiser DECT Contact Center and Office (CC&O) headsets. It describes the DECT security chain comprised of “Pairing”, “Per Call Authentication” and “Encryption”, which are all part of the standard DECT protocol.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

947 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

19 Experts available now in Live!

Get 1:1 Help Now