Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

Remapping modifiers to Qwerty on a Dvorak keyboard


  • Please log in to reply
11 replies to this topic
Crispy
  • Guests
  • Last active:
  • Joined: --
Hi! In case you hadn't noticed, I'm new around here. :) I probably won't stay, but I thought I'd post this script, which is the only reason I found this (very cool) program.

I'm learning to type with the Dvorak keyboard on a Windows machine (verrrrrryyyyy slllooooooowwwwwllllyyyy), and I read somewhere that Macs have a nice quasi-Dvorak setting where normal typing is in Dvorak but any modifiers (except shift) temporarily use Qwerty. This is useful because many common shortcuts are easier to type on a Qwerty keyboard. (Especially ctrl-c, ctrl-v, etc.)

This is dirt simple compared to most of the scripts in this forum, but hopefully somebody else will find it useful (and be thankful that they didn't have to type it all out themselves :p). There may be a better way of doing this, but this way seems to work.

For use with Windows' US-Dvorak setting; tested on Windows XP.

;----------------- CTRL KEY

*^[::Send ^-
*^]::Send ^=

*^'::Send ^q
*^,::Send ^w
*^.::Send ^e
*^p::Send ^r
*^y::Send ^t
*^f::Send ^y
*^g::Send ^u
*^c::Send ^i
*^r::Send ^o
*^l::Send ^p
*^/::Send ^[
*^=::Send ^]

*^o::Send ^s
*^e::Send ^d
*^u::Send ^f
*^i::Send ^g
*^d::Send ^h
*^h::Send ^j
*^t::Send ^k
*^n::Send ^l
*^s::Send ^`;
*^-::Send ^'

*^`;::Send ^z
*^q::Send ^x
*^j::Send ^c
*^k::Send ^v
*^x::Send ^b
*^b::Send ^n
*^m::Send ^m
*^w::Send ^,
*^v::Send ^.
*^z::Send ^/

;----------------- ALT KEY

*![::Send !-
*!]::Send !=

*!'::Send !q
*!,::Send !w
*!.::Send !e
*!p::Send !r
*!y::Send !t
*!f::Send !y
*!g::Send !u
*!c::Send !i
*!r::Send !o
*!l::Send !p
*!/::Send ![
*!=::Send !]

*!o::Send !s
*!e::Send !d
*!u::Send !f
*!i::Send !g
*!d::Send !h
*!h::Send !j
*!t::Send !k
*!n::Send !l
*!s::Send !`;
*!-::Send !'

*!`;::Send !z
*!q::Send !x
*!j::Send !c
*!k::Send !v
*!x::Send !b
*!b::Send !n
*!m::Send !m
*!w::Send !,
*!v::Send !.
*!z::Send !/

;----------------- WINDOWS KEY

*#[::Send #-
*#]::Send #=

*#'::Send #q
*#,::Send #w
*#.::Send #e
*#p::Send #r
*#y::Send #t
*#f::Send #y
*#g::Send #u
*#c::Send #i
*#r::Send #o
*#l::Send #p
*#/::Send #[
*#=::Send #]

*#o::Send #s
*#e::Send #d
*#u::Send #f
*#i::Send #g
*#d::Send #h
*#h::Send #j
*#t::Send #k
*#n::Send #l
*#s::Send #`;
*#-::Send #'

*#`;::Send #z
*#q::Send #x
*#j::Send #c
*#k::Send #v
*#x::Send #b
*#b::Send #n
*#m::Send #m
*#w::Send #,
*#v::Send #.
*#z::Send #/


JoeSchmoe
  • Guests
  • Last active:
  • Joined: --
I've had a nearly identical .ahk script for about a year now!! it's so convenient :) (except I don't map _all_ the winkeys).

I also keep a (compiled) script that goes the OTHER way (maps all qwerty unmodded keys to dvorak), so that whenever I use another computer, I can run the script and get the same behavior as at home (native Dvorak, AHK shortcuts) -- with native shortcuts, AHK Dvorak

Dewi Morgan
  • Members
  • 191 posts
  • Last active: Jun 07 2015 04:02 AM
  • Joined: 03 Oct 2005
Care to post that second one, JoeSchmoe? :) Been meaning to learn to dvoraktype for a while, but too lazy (and ALL the good keyboards are qwerty only!).

But I would verymuch enjoy scraping off my keycap letter, and just use my glowing blue keyboard in dorak style (because glowing is so pointless, with no keycaps!)... the most fun would of course be when other people tried to use the keyboard! :P
Yet another hotkeyer.

Cronus
  • Guests
  • Last active:
  • Joined: --
hi i found that on my system i was unable to use alt+key menu shortcuts as the menu would just open then immedietly close again. the fix was for the alt key remaps just use the new key with no send eg

*!u::Send !f

becomes

*!u::f

  • Guests
  • Last active:
  • Joined: --
I just read this article on how to change the MS Office shortcuts (to allow remapping for CTRL V or CTRL X)

http://www.xomba.com... ... _shortcuts

Really helpfull! :)

Igor
  • Guests
  • Last active:
  • Joined: --
Or... you can simply use a QWERTY keyboard and have a script that will remap keys to Dvorak only when no modifier is used. The following script also disables the Dvorak when Scroll Lock is off, giving me a visual cue as to what keyboard is active.

; Use Scroll Lock to control keyboard
; and do not let Control, Alt, or Win modifiers act on Dvorak
Loop {
	If GetKeyState("ScrollLock", "T") 
	and !GetKeyState("Control") 
	and !GetKeyState("Alt") 
	and !GetKeyState("LWin") 
	and !GetKeyState("RWin") {
		Suspend, Off
	} else {
		Suspend, On
	}
	Sleep, 50
}

; QWERTY to Dvorak mapping
-::[
=::]

q::'
w::,
e::.
r::p
t::y
y::f
u::g
i::c
o::r
p::l
[::/
]::=

;a::a
s::o
d::e
f::u
g::i
h::d
j::h
k::t
l::n
`;::s
'::-

z::`;
x::q
c::j
v::k
b::x
n::b
;m::m
,::w
.::v
/::z
[/code]

anisciq
  • Guests
  • Last active:
  • Joined: --
This is exactly what I was lookin for here :)

Thanx a lot!!!

Ted Striker
  • Members
  • 7 posts
  • Last active: Aug 22 2010 02:49 AM
  • Joined: 14 Aug 2010
I've been using the script Igor posted for a while, but lately I've noticed a bug: after triggering a suspend (with Scroll lock, Win, etc.), my hotstrings (in another script!) stopped working until that other script was reloaded. After a lot of trial and error, I found that making a slight change to Igor's code alleviated the suspended hotstring problem.

; Use Scroll Lock to control keyboard ("off" is Dvorak)
; and do not let Control, Alt, or Win modifiers act on Dvorak
ScrollLock::Suspend
~RWin::Suspend, On
~RWin UP::Suspend, Off
~LWin::Suspend, On
~LWin UP::Suspend, Off
~Ctrl::Suspend, On
~Ctrl UP::Suspend, Off
~Alt::Suspend, On
~Alt UP::Suspend, Off


; QWERTY to Dvorak mapping
-::[
=::]

q::'
w::,
e::.
r::p
t::y
y::f
u::g
i::c
o::r
p::l
[::/
]::=

;a::a
s::o
d::e
f::u
g::i
h::d
j::h
k::t
l::n
`;::s
'::-

z::`;
x::q
c::j
v::k
b::x
n::b
;m::m
,::w
.::v
/::z


Ted Striker
  • Members
  • 7 posts
  • Last active: Aug 22 2010 02:49 AM
  • Joined: 14 Aug 2010
There's one problem with using any script to change QWERTY to Dvorak: AHK hotstrings are hard to use as intended. AHK reads the original QWERTY letters both for the hotstring and the trigger characters. For that reason, it seems like Crispy's solution is the most elegant. However, I had to remove all the Sends to make it work.

chthorne
  • Guests
  • Last active:
  • Joined: --
Here's a simple script to give you the basic CTRL keys (CTRL-z, CTRL-x, CTRL-c, CTRL-v) while using a Dvorak keyboard layout in Windows:

After installing AutoHotkey, add this script into the AutoHotkey script, or a new script.

^;::^z
^q::^x
^j::^c
^k::^v

(of course, you can add more as you desire)

Save it and then follow the steps to have the script run every time you run windows: Locate the file (default location is My Documents) and copy it. Click the Start Menu, navigate to Programs/Startup and paste. Now the file will be in the Startup and will run every time.

That's it!

Thank you http://www.autohotkey.com!!! I've bee fuming over this issue after switching to Dvorak and now it all works.[/url]

ktwitten
  • Members
  • 1 posts
  • Last active: Aug 12 2014 07:26 PM
  • Joined: 12 Aug 2014

Love the script... but I have one program that uses its own built in keyboard map (not the Windows map) and this script doesn't play well with it.  I'm trying to figure out a way to automatically turn the script on/off depending on the active widow.  I tried the Suspend command with little luck.  It suspended the script just fine but can't get it to turn back on.

 

Any suggestions?

 

 



space
  • Members
  • 520 posts
  • Last active:
  • Joined: 12 Aug 2014

Look at the #IfWin(not)Active and #If commands http://ahkscript.org...ocs/commands/