Page 1 of 1

T420 keyboard remapping

Posted: Sat Jan 09, 2016 2:17 pm
by t420poklop
Hi
1) I would like to remap forward/back key (next to up arrow key) to shift between currently opened windows (like if you press alt+tab). Is there any easy way to do? (I have managed to remap ThinkVantage key via .reg file)
2) The microphone turn off/on button is completely useless for me. Is it possible to remap it the same way like the ThinkVatage button?
Thanks for advice
Dave.

Re: T420 keyboard remapping

Posted: Sat Jan 09, 2016 4:43 pm
by rkawakami
What you want can be done using AutoHotKey. I just tested it on an A31p running Windows XP. Couldn't find anything on remapping the microphone key in the AutoHotKey help file. I'm using an older version than what is available now but I assume the following key remap script in the autohotkey.ahk file will still work:

Code: Select all

Browser_Back::
Send, {Alt Down}{Tab}{Alt Up}
return
"Browser_Back" is the name given by AutoHotKey to the keyboard key which is normally used as a browser back function. Similarly, you could also define Browser_Forward:: to change that key as well. "Send," is the command to send out the keyboard key scan sequence which will follow. {Alt Down} is the action of holding down the Alt key, until {Alt Up} is transmitted. {Tab} is just the tab key. So, the sequence is: hold the Alt key down, hit tab, release the Alt key. "return" tells the script to terminate.

ref: https://autohotkey.com/

Re: T420 keyboard remapping

Posted: Sat Jan 09, 2016 9:49 pm
by t420poklop
Thanks it works fine, however it is swithching between only two windows (just exactly like alt+tab do). But when I open more windows, it is still switching between those two windows. Any suggestions?

Re: T420 keyboard remapping

Posted: Sun Jan 10, 2016 3:30 am
by rkawakami
Ah, sorry I think I now know what you wanted. A single Alt-Tab will shift between the last two windows that had focus. Normally, when you want to tab through ALL open windows one-at-a-time, you would hold the Alt key down, press Tab once, see the CoolSwitch mini window pop up, then press the Tab key until the task icon you want is highlight, then release Alt. This can't be done with a single Alt-Tab. Instead, use the keyboard shortcut Alt-Esc. That forces the current window to the bottom of the Z-order list. Therefore, continued repetition of Alt-Esc will eventually cycle through all of the open windows. So, change the AutoHotKey script like this:

Code: Select all

Browser_Back::
Send, {Alt Down}{Esc}{Alt Up}
return
I.e, change "{Tab}" to "{Esc}". Re-load the script into AutoHotkey and it should work.

ref: https://autohotkey.com/board/topic/1738 ... s-hotkeys/

Re: T420 keyboard remapping

Posted: Sun Jan 10, 2016 7:38 am
by t420poklop
Perfect! Thank you very much, this is exactly i wanted.
I also tried to remap Browser_forward button, but without success. The aim is to switch the windows like Browser_Back does, but in opposite direction.

3) And last problem; i use Adobe Photoshop Lightroom, but the scrolling via trackpoint + holding middle-click button does not work, otherwise the scrolling works fine in any other program.
I found a solution via .reg script, however nothing happens.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Synaptics\SynTPEnh]
"UseScrollCursor?"=dword:00000000

Re: T420 keyboard remapping

Posted: Sun Jan 10, 2016 4:20 pm
by rkawakami
I can help you with the first problem (programming Browser_Forward to the opposite sequence as Browser_Back) but not the second.

Here's what you need:

Code: Select all

Browser_Forward::
Send, {Alt Down}{Shift Down}{Esc}{Shift Up}{Alt Up}
return
The keyboard shortcut you need to use is Alt-Shift-Esc; "Activate the window at the bottom of the z-order." It's listed right below the Alt-Esc description in the link I provided earlier. Therefore, you need to add the {Shift Down} and {Shift Up} sequences.

Re: T420 keyboard remapping

Posted: Sun Jan 10, 2016 6:22 pm
by t420poklop
Thanks a lot.
Work with this machine is becoming more and more effective :wink: