Swap Right Shift and Up Keys (Lenovo Yoga 910)

Post your working scripts, libraries and tools for AHK v1.1 and older
doozel
Posts: 4
Joined: 04 Feb 2017, 19:22

Swap Right Shift and Up Keys (Lenovo Yoga 910)

04 Feb 2017, 23:09

A fix for my Yoga 910 to use the Up key as the right shift and use right control for up instead.

Code: Select all

; Change the Up key to Shift and then use Ctrl+Up for normal up
Up::RShift

; Capture the Shift+RCtrl combo to be used for selection
+RCtrl::
Send {Blind}+{Up}
; The timer is required so it doesn't block subsequent requests
SetTimer, RepeatShiftUpKey, 500
return

; This sends the Shift+Up key until RCtrl is released
RepeatShiftUpKey:
loop {
    GetKeyState rc, RCtrl, P
    ; Exit if the key has been released
	if rc = U
        return
    Send {Blind}+{Up}
    Sleep, 10
}
return

; Replace the Right Ctrl with Up key
RCtrl::
Send {Blind}{Up}
; The timer is required so it doesn't block subsequent requests
SetTimer, RepeatUpKey, 500
return

; This sends the Up key until RCtrl is released
RepeatUpKey:
loop {
    GetKeyState rc, RCtrl, P
    ; Exit if the key has been released
	if rc = U
        return
    Send {Blind}{Up}
    Sleep, 10
}
return
guest3456
Posts: 3463
Joined: 09 Oct 2013, 10:31

Re: Swap Right Shift and Up Keys (Lenovo Yoga 910)

05 Feb 2017, 00:57

jesus christ what did those idiots at Lenovo do?

http://www.laptopmag.com/images/uploads ... -w-g08.jpg

thank god they haven't messed with this on the ThinkPads yet

User avatar
davebrny
Posts: 85
Joined: 05 Dec 2016, 06:26

Re: Swap Right Shift and Up Keys (Lenovo Yoga 910)

05 Feb 2017, 04:27

i use the altGr & jkli on my (un-bastardised :)) Lenovo keyboard for the arrow keys, but just "rAlt" might work for yours"? its handy when youre typing but don't want to move off the home row

Code: Select all

rAlt::rAlt := true
rAlt up::rAlt := false

#if rAlt

j::send {left}      ; move caret
k::send {down}
i::send {up}
l::send {right}

+j::send +{left}     ; select text
+k::send +{down}
+i::send +{up}
+l::send +{right}

,::send {backspace}
.::send {delete}

#if
guest3456 wrote:yet


yet lol
guest3456
Posts: 3463
Joined: 09 Oct 2013, 10:31

Re: Swap Right Shift and Up Keys (Lenovo Yoga 910)

05 Feb 2017, 09:50

davebrny wrote:i use the altGr & jkli on my (un-bastardised :)) Lenovo keyboard for the arrow keys, but just "rAlt" might work for yours"? its handy when youre typing but don't want to move off the home row
yep good one, but i'd use hjkl ala vim

User avatar
davebrny
Posts: 85
Joined: 05 Dec 2016, 06:26

Re: Swap Right Shift and Up Keys (Lenovo Yoga 910)

05 Feb 2017, 14:54

guest3456 wrote:yep good one, but i'd use hjkl ala vim
if you were using rAlt as the modifier then your hand might start to cramp using those keys. the mButton (on thinkpads with a trackpoint) works a lot better than rAlt since you can press it with either thumb and reach most other keys with either hand.

kl;o is the most comfortable to use with rAlt but i switched to jkli since thats where your fingers would be anyway. if i ever start using vim ill probably switch to hjkl.
guest3456
Posts: 3463
Joined: 09 Oct 2013, 10:31

Re: Swap Right Shift and Up Keys (Lenovo Yoga 910)

05 Feb 2017, 18:39

i'd probably use both Alt's

i think the only Alt shortcut i use is Alt+D to go to web browser url bar.

i dont use Alt to access the File menus etc, but those who do would probably want to use AltGr like you said

i used to consider using Alt's as a replacement for Shift, so that i could capitalize letters with my thumbs, but i'm going to experiment with Sticky Shift instead

Radknight 11

Re: Swap Right Shift and Up Keys (Lenovo Yoga 910)

12 May 2017, 04:28

Hey all, I've gone and done the swap with Swap Keys and it worked like a charm. Downside is that that I broke one of the key (white insides) while physically swapping them. The tiniest little nub broke off where it hinges.

Does anyone know where I can get replacement keys or at least the white insides? I've tried Laptop-Keys.com with no success. Sad because it's a brand new fully loaded Yoga 910 with 16GB RAM and a 1TB SSD and now it looks like a second hand beater with the key missing.

On a side note, I had to buy another laptop for work. Because of the horrendous location of the 'Shift' and 'Page Up' keys, I gave Lenovo a pass and picked up a fully loaded Dell XPS 15. Not as nice looking as the Yoga but it's a very solid business machine.

Maybe Lenovo will get the hint when they start seeing sales drop because of the silly button position.
Jorge Rionegro

Re: Swap Right Shift and Up Keys (Lenovo Yoga 910)

21 Jul 2017, 02:47

Thanks for this one. Works perfectly for my diary use ¡¡¡

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: Google [Bot], OrangeCat and 272 guests