Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Logitech MX 3100/3000 Wireless Keyboard Script


  • Please log in to reply
10 replies to this topic
Peepsalot
  • Members
  • 24 posts
  • Last active: Dec 16 2005 04:53 PM
  • Joined: 06 Oct 2005
I put together this script as an alternative to the standard logitech drivers. Hopefully someone finds it useful.

; MXConfigureScript v1.0 by Peepsalot
; Scan Codes for the Logitech MX 3100/3000 Keyboard
; For use with AutoHotkey (www.autohotkey.com)
; Send questions or comments to [email protected]

; This file lists the key codes for all the non-standard keys on the
; Logitech keyboard to aid anyone wanting to set up a custom configuration.

; I felt this was necesarry due to the inadequate drivers provided by Logitech
; This is meant to be run WITHOUT Logitech's Setpoint drivers installed
; I have not tested it in conjunction with these installed drivers

; Keys are listed in this script divided into sections
; The sections go from left to right, top to bottom as seen on the keyboard

; All keys are commented out by default and it is left to the user to decide
; which keys to uncomment and assign actions to.
; I have left a few of the key commands that I use in the script as examples,
; for the most part they perform similar to the default behavior of the Logitech drivers.

; The product names used in this file are for identification purposes only.
; All trademarks and registered trademarks are the property of their 
; respective owners.
; The author is not responsible for any damages or loss caused
; by the use of this script.
; Use at your own risk.



;===============================================
;TOP LEFT (Digital Media Library & My Documents)
;===============================================
;sc114:: Run %USERPROFILE%\My Documents\My Videos       ; Movies
;sc113:: Run %USERPROFILE%\My Documents\My Music        ; Music
;sc115:: Run %USERPROFILE%\My Documents\My Pictures     ; Pictures
;sc155:: Run %USERPROFILE%\My Documents                 ; My Documents


;===============
;TOP MIDDLE-LEFT
;===============
;sc131:: Return                                         ; Flame?
;sc178:: Return                                         ; Record
;sc16D:: Return                                         ; Media


;============================
;MIDDLE MEDIA PLAYER CONTROLS
;============================
;sc130:: SoundSetWaveVolume +10                         ; Volume Up  (Wheel)
;sc12E:: SoundSetWaveVolume -10                         ; Volume Down(Wheel)
;+sc130:: SoundSetWaveVolume +1                         ; Volume Up  (Wheel) w/ Shift for precision
;+sc12E:: SoundSetWaveVolume -1                         ; Volume Down(Wheel) w/ Shift for precision
;sc120:: Return                                         ; Mute
;sc110:: Return                                         ; Prev Track
;sc119:: Return                                         ; Next Track
;sc12D:: Return                                         ; Remote Control
;sc12F:: Return                                         ; Eject
;sc122:: Return                                         ; Play/Pause
;sc124:: Return                                         ; Stop

;================
;TOP MIDDLE-RIGHT
;================
;sc12C:: Return                                         ; 1 (Audio Presets)
;sc125:: Return                                         ; 2 (Audio Presets)
;sc126:: Return                                         ; 3 (Audio Presets)

;=========
;TOP RIGHT
;=========
;sc16C:: Run, www.gmail.com                             ; E-Mail
;sc111:: Return                                         ; Messenger
;sc175:: Return                                         ; Status
;sc174:: Return                                         ; Webcam

;===========
;F MODE KEYS
;===========
; F Mode toggles on and off similarly to Num Lock or Caps Lock
;sc13B:: Return                                         ; Help          (F Mode F1)
;sc13C:: Return                                         ; MS Word       (F Mode F2)
;sc13D:: Return                                         ; MS Excel      (F Mode F3)
;sc13E:: Return                                         ; MS PowerPoint (F Mode F4)
;sc13F:: Return                                         ; Undo          (F Mode F5)
;sc140:: Return                                         ; Redo          (F Mode F6)
;sc141:: Return                                         ; Print         (F Mode F7)
;sc142:: Return                                         ; Save          (F Mode F8)
;sc143:: Return                                         ; Programmable A(F Mode F9)
;sc144:: Return                                         ; Programmable B(F Mode F10)
;sc157:: Return                                         ; Programmable C(F Mode F11)
;sc158:: Return                                         ; Programmable D(F Mode F12)


;=================================================================
;RIGHT SIDE: Calculator and Sleep (see note below about sleep key)
;=================================================================
;sc121:: Run notepad.exe                                         ; Calculator
;sc15F:: MsgBox "Goodnight!"                                         ; Sleep

; ====NOTE====
; The Sleep Key can be used as a hotkey, but first Windows must be configured
; properly for it.  In Windows XP: Open Control Panel, Power Options,
; click the advanced tab, and select "Do Nothing" for the Sleep key option
; Un-comment the next line if you wish to use the Sleep Key
; Also, there seems to be a 1-2sec delay built in for this key


;=========
;LEFT SIDE
;=========
;sc06A:: Return                                         ; Zoom +
;sc104:: Return                                         ; Zoom -
;sc06B:: Return                                         ; %


;==============================================================
;SCROLL DEVICE (see bottom of script for keyboard scroll wheel)
;==============================================================
;sc06C:: Return                                         ; Tilt Left
;sc06E:: Return                                         ; Tilt Right
;sc103 & WheelUp:: Send {Up}                            ; Double Arrow Up
;sc102 & WheelDown:: Send {Down}                        ; Double Arrow Down

;==========================================================
;BOTTOM LEFT KEYS (see note below about the left Enter key)
;==========================================================
;sc06D:: Return                                         ; "X" (Close Window)
;sc101:: Return                                         ; Program Switcher
;sc01C:: Return                                         ; Enter Key 


; ====NOTE====
; This left enter key is exactly the same as the normal enter key
; Making this a hotkey will affect both keys! This is here for reference, 
; but commented out for a reason.




;========================
;KEYBOARD WHEEL CODE
;========================
; The following code is used to decipher the difference between the keyboard
; wheel and the keyboard up and down keys that it normally functions as.
; This is a tricky thing to do, since the key codes it returns are identical.
; The code I have written is able to tell the difference by the timing of the
; key events, which is slightly different between the wheel and arrow keys.
; This code will delay your up and down arrow key presses by 30ms.
; Hardly noticable, but hardcore gamers may frown upon any extra lag
; Furthermore I have only tested this on my system, and other systems
; may behave differently with respect to timing.
; Due to these issues I have commented this section out by default
; Feel free to uncomment it and try it out yourself if you like
; The only two lines that need to be edited or replaced are marked by comments
/*
$Up::
PriorUpHotKey := A_PriorHotkey
if PriorUpHotKey=$Up
{
  ActualUpArrow := 1
  repeatUp := 1
  Send {Up down}
}
else
{
  KeyWait Up, T0.03
  if (ErrorLevel or repeatUp=1)
  {
    ActualUpArrrow := 1
    Send {Up down}
  }
  else
  {
    ActualUpArrow := 0
    Send {WheelUp} ;REPLACE THIS LINE WITH YOUR OWN COMMAND(S) FOR WHEEL UP
  }
  repeatUp := 0
}
Return
$Up up::
if ActualUpArrow
  Send {Up up}
Return

$Down::
PriorDownHotKey := A_PriorHotkey
if PriorDownHotkey=$Down
{
  ActualDownArrow := 1
  repeatDown := 1
  Send {Down down}
}
else
{
  KeyWait Down, T0.03
  if (ErrorLevel or repeatDown=1)
  {
    ActualDownArrrow := 1
    Send {Down down} 
  }
  else
  {
    ActualDownArrow := 0
    Send {WheelDown} ;REPLACE THIS LINE WITH YOUR OWN COMMAND(S) FOR WHEEL DOWN
  }
  repeatDown := 0
}
Return
$Down up::
if ActualDownArrow
  Send {Down up}
Return
*/


Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Nice presentation. I expect this will help other owners of Logitech MX 3100/3000 keyboards (and perhaps similar keyboard too).

Laughing Man
  • Members
  • 84 posts
  • Last active: Oct 25 2007 04:43 AM
  • Joined: 28 Apr 2005
Interesting script..I think I could use it with my logitech keyboard too..though we'll see if it'll work with the Logitech drivers installed though if not I think you can deactivate them.
"I thought what I'd do was I'd pretend I was one of those deaf-mutes" ~ Laughing Man - GITS:SAC

Peepsalot
  • Members
  • 24 posts
  • Last active: Dec 16 2005 04:53 PM
  • Joined: 06 Oct 2005
Cool. Let me know how it goes. Do you know the model number of your keyboard?

I was wondering if I should bother putting a default function in for every button, set up mostly like the normal drivers, or if it's better to leave them mostly blank.

Peepsalot
  • Members
  • 24 posts
  • Last active: Dec 16 2005 04:53 PM
  • Joined: 06 Oct 2005
Well, I just noticed something tonight. The keyboard/mouse combo I have are wireless and the receiver for both is in one unit. The unit has a wire that branches off, one for mouse and one for keyboard. The mouse cable is PS/2, and the keyboard cable is USB, with a little converter to go to PS/2. I wrote this script with both devices plugged in as PS/2.

I just tried unplugging both PS/2 connections, and having only the USB connected. Both the keyboard and mouse are able to work through this single USB connection, but most of the extra keys on the keyboard are no longer able to be caught by AutoHotkey. Both the keyboard scroll wheel and "cruise control" buttons now all function exactly as a mousewheel and are indistinguishable from a real moushweel input. The mouse performance seems unaffected.

Laughing Man
  • Members
  • 84 posts
  • Last active: Oct 25 2007 04:43 AM
  • Joined: 28 Apr 2005
Hmm I don't think it's working for me. At least after I compile it and run it, no sign of it running at all. (visual, process, nothing).
"I thought what I'd do was I'd pretend I was one of those deaf-mutes" ~ Laughing Man - GITS:SAC

Peepsalot
  • Members
  • 24 posts
  • Last active: Dec 16 2005 04:53 PM
  • Joined: 06 Oct 2005
Well, if you didn't edit the script at all, then yeah it won't do anything. If you notice, every line is commented out with a semi-colon. You have to choose which keys you want to use/override and uncomment those lines. On top of that, even after you un-comment some keys, only a few of them are actually assigned to do something, most keys are set to do nothing at all by default. I left most of these settings up to the user since there is no way to please everyone. This script is merely meant to aid in identifying the key codes for each key.

Peepsalot
  • Members
  • 24 posts
  • Last active: Dec 16 2005 04:53 PM
  • Joined: 06 Oct 2005
Also, do you know what model keyboard you have? You never mentioned it.

Laughing Man
  • Members
  • 84 posts
  • Last active: Oct 25 2007 04:43 AM
  • Joined: 28 Apr 2005
I have an LX 700. Sorry for the abscense of a reply..I'm busy at college.

Edit: My AutoHotKey was bugged. O.O none of my scripts were working. I reinstalled it and this seems to work. Thanks ^_^

Edit 2: Setpoint seems to override any commands that is set in AHK. Even if you set the key to do nothing in setpoint.
"I thought what I'd do was I'd pretend I was one of those deaf-mutes" ~ Laughing Man - GITS:SAC

vitalyb
  • Members
  • 18 posts
  • Last active: Nov 23 2010 06:15 AM
  • Joined: 28 Mar 2006
You might want to look into an OSD emulation I made.
It acts and looks similar to the OSD that comes with SetPoint:

http://www.autohotke... ... 4569#54569
Vitaly

Laughing Man
  • Members
  • 84 posts
  • Last active: Oct 25 2007 04:43 AM
  • Joined: 28 Apr 2005
hehe old thread. Yeah..I actually just replaced Setpoint with this script once. Though then I discovered LogiGamer and I'm using that now.
"I thought what I'd do was I'd pretend I was one of those deaf-mutes" ~ Laughing Man - GITS:SAC