Community Forums Today's Posts     Member List     Archive    
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Location
    Wiesbaden, DE
    Posts
    147

    Teamspeak Keyboard Lights for Windows

    Hi all,

    First off, this post is basically a continuation of this thread. Please have a look there if you like for background info.

    I looked into this initially, but had determined that in order to alter the state of the keyboard leds without altering the state of the associated key would require direct access to the BIOS's keyboard interface. Since this is something that WinNT/2K/XP simply does not normally allow, I had given up on this project and forgotten about it.

    Very recently, I stumbled across this website which has a set of libraries that allow direct port access in WinNT based OS'es and it reminded me of this project.

    I have quickly whipped up a beta app for demonstration purposes, though I really can't think of too many other features that would need to be incorporated.

    The program is called TsKbLights and is available for download from that link. When started, it will flash the scroll-lock LED whenever anyone is speaking in Teamspeak. When nobody is speaking, the keyboard LEDS are reset to their original state. Also, the keyboard LED state changes are kept completely separate from the actual state of the key itself, meaning that, while the scroll-lock LED is flashing, the scroll-lock key state (as well as the NumLock and CapsLock key states ) remains as it was set by the user.

    This app requires the MS .NET framework to run since it was written in C#. I have no idea how this would be ported over to Linux since I am not a linux programmer at all and I have no idea how to access the keyboard hardware in linux.

    This app is also beta. This means that I have no idea how it will perform on your system, nor can I guarantee that your computer won't start on fire and speak to you in the name of god, or other such problems, when you use it. That said, it should be fairly safe. If, for some reason (see below), your keyboard becomes unresponsive while using this app, there is a "Reset Keyboard" button in the app which sends a full reset to the keyboard. While writing this app, I managed to lock up my keyboard more than once by testing certain commands sent to the KB which is why I made the button. This app should not do this, but I left the button in just in case it does.

    Programming Stuff:
    If you are a linux programmer, then it should be fairly easy for you to do this yourself, since I understand that direct port access is fairly simple in that world.

    Basically, you must write the following bytes to the keyboard address (0x60):
    Byte 1 = 0xED / Written to port 0x60 to notify the keyboard that you are sending a command to change the LED state.
    Byte 2 = 0x01, 0x02, or 0x04 / Sets the Scroll, Num, Caps LED states.

    The bit order is important in byte 2: 00000CNS

    Bits 3-7 must be 0.
    Bit 0 sets the (S)croll lock LED. 1 for on, 0 for off.
    Bit 1 sets the (N)umlock LED. 1 for on, 0 for off.
    Bit 2 sets the (C)apslock LED. 1 for on, 0 for off.

    If you send the 0xED byte, then fail to send the LED state byte, the keyboard will be inaccessible and will wait for that byte until: a) Another command with the same, or higher precedence is sent to the keyboard, or b) You send the LED state byte. I've managed to lock up my keyboard quite a few times by doing this, so you may want to make a mouse-clickable program first which will reset your keyboard.

    To do a full KB reset, you just send a byte containing 0xFF to port 0x60.

    I hope this app is usefull to at least some of you,

    pb
    Last edited by pbarrette; 02-07-2004 at 19:31.

  2. #2
    Join Date
    May 2004
    Location
    Canada
    Posts
    7
    Awesome Peter, thanks a billion! I'm look'n forward to trying it out.

  3. #3
    Bastian Guest
    Please add your project to our offcial Third Party Resources section.
    You can find more information about this section in our website FAQ.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Start stop script for TeamSpeak daemon (init)
    By Cybernaut in forum [TeamSpeak 2] Server Support
    Replies: 2
    Last Post: 11-11-2004, 17:07
  2. Error every time I turn teamspeak on - can't use keyboard!
    By MrWiz in forum [TeamSpeak 2] Client Support
    Replies: 3
    Last Post: 01-06-2004, 16:33
  3. New Keyboard, Numlock / Teamspeak / DoD Issue
    By Punkrulz in forum [TeamSpeak 2] Client Support
    Replies: 1
    Last Post: 27-10-2003, 03:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •