AutoHotkey Community

It is currently May 27th, 2012, 4:51 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 36 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject:
PostPosted: August 15th, 2008, 1:39 am 
here's a significantly simpler solution:

Code:
; Use Scroll Lock to control keyboard ("on" is Dvorak)
; 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


Report this post
Top
  
Reply with quote  
 Post subject: Dvorak Default
PostPosted: November 19th, 2008, 5:02 am 
thanks for the scripts, but I was wondering if we can do it the other way around.

I have my default keyboard to Dvorak. So, all I need is a script that tells my keyboard to change to qwerty whenever I press the Ctrl, Alt or Win keys, and back to Dvorak right after that.

Is this possible?

TIA.


Report this post
Top
  
Reply with quote  
 Post subject: Thanks
PostPosted: April 7th, 2009, 7:04 pm 
Offline

Joined: January 7th, 2009, 7:03 pm
Posts: 43
Thanks for this.

I made one with just the hotkeys, but this one works a little better, faster switching of the keyboard layout too is essential. The biggest hump to learning dvorak is that all hotkeys for most programs "hitting alt v, f, etc" for bringing up menus on stuff like explorer, photoshop, etc. is made for the qwerty layout, using a mouse and one hand keyboard is easy on qwerty because of this, but impossible on dvorak.

This script helps out with this alot, adds an extra button when flipping through tasks and programs, but helps out immensily.

Thanks!


Report this post
Top
 Profile  
Reply with quote  
PostPosted: November 12th, 2009, 1:58 am 
Offline

Joined: January 12th, 2008, 3:47 am
Posts: 5
So I finally got around to compiling versions for download, kindly hosted by Dropbox (which I am madly in love with).

Note that these versions are identical to my original post, EXCEPT the Dvorak-QWERTY toggle key is Scroll Lock instead of Right Windows (RWin).

Version with no message window:
http://dl.dropbox.com/u/107074/Dvorak-QWERTY_Command/DvorakQWERTYCommand.exe

Version with message window (for the uninitiated):
http://dl.dropbox.com/u/107074/Dvorak-QWERTY_Command/DvorakQWERTYCommand-Portable.exe

Everything in one zip file:
http://dl.dropbox.com/u/107074/Dvorak-QWERTY_Command/Dvorak-QWERTY_Command.zip

Enjoy!

P.S. If you are interested in trying Dropbox, this link will get you and me an extra 250MB free.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 2nd, 2010, 1:40 am 
Offline

Joined: December 29th, 2009, 7:02 pm
Posts: 12
For those whose default keyboard is Dvorak or ANY non-qwerty layout this may become handy:

Code:
SetBatchLines -1
SleepDuration = 1
TimePeriod = 1

SC := "SC0x2 SC0x3 SC0x4 SC0x5 SC0x6 SC0x7 SC0x8 SC0x9 SC0xa SC0xb SC0xc SC0xd SC0x10 SC0x11 SC0x12 SC0x13 SC0x14 SC0x15 SC0x16 SC0x17 SC0x18 SC0x19 SC0x1a SC0x1b SC0x1e SC0x1f SC0x20 SC0x21 SC0x22 SC0x23 SC0x24 SC0x25 SC0x26 SC0x27 SC0x28 SC0x29 SC0x2b SC0x2c SC0x2d SC0x2e SC0x2f SC0x30 SC0x31 SC0x32 SC0x33 SC0x34 SC0x35 SC0x56"
StringSplit, SC, SC, %A_Space%

MakeDefault()
return


MakeDefault()
{
   Loop, 48
   {
      sc := sc%A_Index%
      Hotkey, *%sc%, off
   }
}

WaitRelease()
{
   Loop
   {
      If !(GetKeyState("Ctrl")
      or GetKeyState("Alt")
      or GetKeyState("LWin")
      or GetKeyState("RWin"))
         Break
      Sleep, 10
   }
}

MakeQwerty()
{
   Loop, 48
   {
      sc := sc%A_Index%
      Hotkey, *%sc%, on
   }
}


~*Ctrl::
~*Alt::
~*LWin::
~*RWin::
Sleep, 1
If GetKeyState("RAlt") ; This prevents from switching if it was AltGr pressed.
   return
MakeQwerty()
WaitRelease()
MakeDefault()
return


; ##############################
;         QWERTY MAPPING
; ##############################

*SC0x2::Send {Blind}{1}
*SC0x3::Send {Blind}{2}
*SC0x4::Send {Blind}{3}
*SC0x5::Send {Blind}{4}
*SC0x6::Send {Blind}{5}
*SC0x7::Send {Blind}{6}
*SC0x8::Send {Blind}{7}
*SC0x9::Send {Blind}{8}
*SC0xa::Send {Blind}{9}
*SC0xb::Send {Blind}{0}
*SC0xc::Send {Blind}{-}
*SC0xd::Send {Blind}{=}
*SC0x10::Send {Blind}{q}
*SC0x11::Send {Blind}{w}
*SC0x12::Send {Blind}{e}
*SC0x13::Send {Blind}{r}
*SC0x14::Send {Blind}{t}
*SC0x15::Send {Blind}{y}
*SC0x16::Send {Blind}{u}
*SC0x17::Send {Blind}{i}
*SC0x18::Send {Blind}{o}
*SC0x19::Send {Blind}{p}
*SC0x1a::Send {Blind}{[}
*SC0x1b::Send {Blind}{]}
*SC0x1e::Send {Blind}{a}
*SC0x1f::Send {Blind}{s}
*SC0x20::Send {Blind}{d}
*SC0x21::Send {Blind}{f}
*SC0x22::Send {Blind}{g}
*SC0x23::Send {Blind}{h}
*SC0x24::Send {Blind}{j}
*SC0x25::Send {Blind}{k}
*SC0x26::Send {Blind}{l}
*SC0x27::Send {Blind}{;}
*SC0x28::Send {Blind}{'}
*SC0x29::Send {Blind}{vkC0} ;    ` key
*SC0x2b::Send {Blind}{\}
*SC0x2c::Send {Blind}{z}
*SC0x2d::Send {Blind}{x}
*SC0x2e::Send {Blind}{c}
*SC0x2f::Send {Blind}{v}
*SC0x30::Send {Blind}{b}
*SC0x31::Send {Blind}{n}
*SC0x32::Send {Blind}{m}
*SC0x33::Send {Blind}{,}
*SC0x34::Send {Blind}{.}
*SC0x35::Send {Blind}{/}
*SC0x56::Send {Blind}{vkE2} ;    the additional key, backslash (\) on standard qwerty


It's a script that makes our layout Qwerty whenever Ctrl, Alt or Win key is pressed. It is also compatible with AltGr. I just felt like posting that. I hope somebody will like it. :-)

Cheers,
Long Bong.

Edit: I have found a mistake.
Code:
*SC0x28::Send {Blind}{'}
This were wrongly assigned to ( - ) instead of ( ' ).



Edit 2:
For those, who proudly use AutoHotKey_L, this is much simplier code, which does pretty much the same.
Code:
SetBatchLines -1
SleepDuration = 1
TimePeriod = 1

~*Ctrl::
~*Alt::
~*LWin::
~*RWin::
Sleep, 1 ;                 This prevents from
If GetKeyState("RAlt") ;   switching if it
   return ;                was AltGr pressed.
Qwerty = 1
Loop ;    Waits for keys to be released.
{
   If !(GetKeyState("Ctrl")
   or GetKeyState("Alt")
   or GetKeyState("LWin")
   or GetKeyState("RWin"))
      Break
   Sleep, 10 ;    This makes the script less CPU consuming.
}
Qwerty = 0
return


; ##############################
;         QWERTY MAPPING
; ##############################

#If Qwerty
SC0x2::1
SC0x3::2
SC0x4::3
SC0x5::4
SC0x6::5
SC0x7::6
SC0x8::7
SC0x9::8
SC0xa::9
SC0xb::0
SC0xc::-
SC0xd::=
SC0x10::q
SC0x11::w
SC0x12::e
SC0x13::r
SC0x14::t
SC0x15::y
SC0x16::u
SC0x17::i
SC0x18::o
SC0x19::p
SC0x1a::[
SC0x1b::]
SC0x1e::a
SC0x1f::s
SC0x20::d
SC0x21::f
SC0x22::g
SC0x23::h
SC0x24::j
SC0x25::k
SC0x26::l
SC0x27::`;
SC0x28::'
SC0x29::vkC0 ;    ( ` ) key
SC0x2b::\
SC0x2c::z
SC0x2d::x
SC0x2e::c
SC0x2f::v
SC0x30::b
SC0x31::n
SC0x32::m
SC0x33::,
SC0x34::.
SC0x35::/
SC0x56::vkE2 ;    the additional key, backslash ( \ ) on standard qwerty
#if

Have fun!


Last edited by Long Bong on April 2nd, 2010, 1:50 pm, edited 6 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 2nd, 2010, 12:51 pm 
Offline

Joined: August 28th, 2009, 3:00 pm
Posts: 275
I like it Long Bong, it's a well done script. I would have found it more useful when I switched to Colemak almost a year ago :). Colemak shortcut keys are pretty similar to Qwerty anyway, so now I'm used to them (really just Ctrl-S, Ctrl-F, and Ctrl-Y that are moved). Thanks though :).


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 2nd, 2010, 3:19 pm 
Offline

Joined: January 10th, 2009, 1:34 pm
Posts: 135
Location: Virginia
Long Bong wrote:
For those whose default keyboard is Dvorak or ANY non-qwerty layout this may become handy:

Code:
SetBatchLines -1
SleepDuration = 1
TimePeriod = 1

SC := "SC0x2 SC0x3 SC0x4 SC0x5 SC0x6 SC0x7 SC0x8 SC0x9 SC0xa SC0xb SC0xc SC0xd SC0x10 SC0x11 SC0x12 SC0x13 SC0x14 SC0x15 SC0x16 SC0x17 SC0x18 SC0x19 SC0x1a SC0x1b SC0x1e SC0x1f SC0x20 SC0x21 SC0x22 SC0x23 SC0x24 SC0x25 SC0x26 SC0x27 SC0x28 SC0x29 SC0x2b SC0x2c SC0x2d SC0x2e SC0x2f SC0x30 SC0x31 SC0x32 SC0x33 SC0x34 SC0x35 SC0x56"
StringSplit, SC, SC, %A_Space%

MakeDefault()
return


MakeDefault()
{
   Loop, 48
   {
      sc := sc%A_Index%
      Hotkey, *%sc%, off
   }
}

WaitRelease()
{
   Loop
   {
      If !(GetKeyState("Ctrl")
      or GetKeyState("Alt")
      or GetKeyState("LWin")
      or GetKeyState("RWin"))
         Break
      Sleep, 10
   }
}

MakeQwerty()
{
   Loop, 48
   {
      sc := sc%A_Index%
      Hotkey, *%sc%, on
   }
}


~*Ctrl::
~*Alt::
~*LWin::
~*RWin::
Sleep, 1
If GetKeyState("RAlt") ; This prevents from switching if it was AltGr pressed.
   return
MakeQwerty()
WaitRelease()
MakeDefault()
return


; ##############################
;         QWERTY MAPPING
; ##############################

*SC0x2::Send {Blind}{1}
*SC0x3::Send {Blind}{2}
*SC0x4::Send {Blind}{3}
*SC0x5::Send {Blind}{4}
*SC0x6::Send {Blind}{5}
*SC0x7::Send {Blind}{6}
*SC0x8::Send {Blind}{7}
*SC0x9::Send {Blind}{8}
*SC0xa::Send {Blind}{9}
*SC0xb::Send {Blind}{0}
*SC0xc::Send {Blind}{-}
*SC0xd::Send {Blind}{=}
*SC0x10::Send {Blind}{q}
*SC0x11::Send {Blind}{w}
*SC0x12::Send {Blind}{e}
*SC0x13::Send {Blind}{r}
*SC0x14::Send {Blind}{t}
*SC0x15::Send {Blind}{y}
*SC0x16::Send {Blind}{u}
*SC0x17::Send {Blind}{i}
*SC0x18::Send {Blind}{o}
*SC0x19::Send {Blind}{p}
*SC0x1a::Send {Blind}{[}
*SC0x1b::Send {Blind}{]}
*SC0x1e::Send {Blind}{a}
*SC0x1f::Send {Blind}{s}
*SC0x20::Send {Blind}{d}
*SC0x21::Send {Blind}{f}
*SC0x22::Send {Blind}{g}
*SC0x23::Send {Blind}{h}
*SC0x24::Send {Blind}{j}
*SC0x25::Send {Blind}{k}
*SC0x26::Send {Blind}{l}
*SC0x27::Send {Blind}{;}
*SC0x28::Send {Blind}{'}
*SC0x29::Send {Blind}{vkC0} ;    ` key
*SC0x2b::Send {Blind}{\}
*SC0x2c::Send {Blind}{z}
*SC0x2d::Send {Blind}{x}
*SC0x2e::Send {Blind}{c}
*SC0x2f::Send {Blind}{v}
*SC0x30::Send {Blind}{b}
*SC0x31::Send {Blind}{n}
*SC0x32::Send {Blind}{m}
*SC0x33::Send {Blind}{,}
*SC0x34::Send {Blind}{.}
*SC0x35::Send {Blind}{/}
*SC0x56::Send {Blind}{vkE2} ;    the additional key, backslash (\) on standard qwerty


It's a script that makes our layout Qwerty whenever Ctrl, Alt or Win key is pressed. It is also compatible with AltGr. I just felt like posting that. I hope somebody will like it. :-)

Cheers,
Long Bong.

Edit: I have found a mistake.
Code:
*SC0x28::Send {Blind}{'}
This were wrongly assigned to ( - ) instead of ( ' ).



Edit 2:
For those, who proudly use AutoHotKey_L, this is much simplier code, which does pretty much the same.
Code:
SetBatchLines -1
SleepDuration = 1
TimePeriod = 1

~*Ctrl::
~*Alt::
~*LWin::
~*RWin::
Sleep, 1 ;                 This prevents from
If GetKeyState("RAlt") ;   switching if it
   return ;                was AltGr pressed.
Qwerty = 1
Loop ;    Waits for keys to be released.
{
   If !(GetKeyState("Ctrl")
   or GetKeyState("Alt")
   or GetKeyState("LWin")
   or GetKeyState("RWin"))
      Break
   Sleep, 10 ;    This makes the script less CPU consuming.
}
Qwerty = 0
return


; ##############################
;         QWERTY MAPPING
; ##############################

#If Qwerty
SC0x2::1
SC0x3::2
SC0x4::3
SC0x5::4
SC0x6::5
SC0x7::6
SC0x8::7
SC0x9::8
SC0xa::9
SC0xb::0
SC0xc::-
SC0xd::=
SC0x10::q
SC0x11::w
SC0x12::e
SC0x13::r
SC0x14::t
SC0x15::y
SC0x16::u
SC0x17::i
SC0x18::o
SC0x19::p
SC0x1a::[
SC0x1b::]
SC0x1e::a
SC0x1f::s
SC0x20::d
SC0x21::f
SC0x22::g
SC0x23::h
SC0x24::j
SC0x25::k
SC0x26::l
SC0x27::`;
SC0x28::'
SC0x29::vkC0 ;    ( ` ) key
SC0x2b::\
SC0x2c::z
SC0x2d::x
SC0x2e::c
SC0x2f::v
SC0x30::b
SC0x31::n
SC0x32::m
SC0x33::,
SC0x34::.
SC0x35::/
SC0x56::vkE2 ;    the additional key, backslash ( \ ) on standard qwerty
#if

Have fun!


Very interesting.

So can it be used to remap hotkeys to a particular layout?

I have a program written for qwerty with hotkeys.

Code:
y::msbox Do Something


Can this script convert between keyboard layouts to preexisting hotkeys?

Can z act as the y hotkey and y triggering something else.
I have currently used hotkey vars to define this... with an ini file.

However, going to AZERTY is a bit more problematic.

Will your script or some other script convert keyboard layouts like qwerty to qwertz or azerty with already defined hotkeys?

Hmmm... I don't know if that was clear?

_________________
KeyMce/GenMce - mackie emulator for pc keyboard/Convert your controller to mackie.
Midi I/O - Want to play with midi/ahk?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 2nd, 2010, 3:58 pm 
Offline

Joined: December 29th, 2009, 7:02 pm
Posts: 12
Quote:
So can it be used to remap hotkeys to a particular layout?

Yes. All the hotkeys will work as on qwerty. To achieve that, you need to place your qwerty hotkeys somewhere in my script. Unless it's Suspend command they will work fine.

Example:
Code:
SetBatchLines -1
SleepDuration = 1
TimePeriod = 1

SC := "SC0x2 SC0x3 SC0x4 SC0x5 SC0x6 SC0x7 SC0x8 SC0x9 SC0xa SC0xb SC0xc SC0xd SC0x10 SC0x11 SC0x12 SC0x13 SC0x14 SC0x15 SC0x16 SC0x17 SC0x18 SC0x19 SC0x1a SC0x1b SC0x1e SC0x1f SC0x20 SC0x21 SC0x22 SC0x23 SC0x24 SC0x25 SC0x26 SC0x27 SC0x28 SC0x29 SC0x2b SC0x2c SC0x2d SC0x2e SC0x2f SC0x30 SC0x31 SC0x32 SC0x33 SC0x34 SC0x35 SC0x56"
StringSplit, SC, SC, %A_Space%

MakeDefault()
return


MakeDefault()
{
   Loop, 48
   {
      sc := sc%A_Index%
      Hotkey, *%sc%, off
   }
}

WaitRelease()
{
   Loop
   {
      If !(GetKeyState("Ctrl")
      or GetKeyState("Alt")
      or GetKeyState("LWin")
      or GetKeyState("RWin"))
         Break
      Sleep, 10
   }
}

MakeQwerty()
{
   Loop, 48
   {
      sc := sc%A_Index%
      Hotkey, *%sc%, on
   }
}


~*Ctrl::
~*Alt::
~*LWin::
~*RWin::
Sleep, 1
If GetKeyState("RAlt") ; This prevents from switching if it was AltGr pressed.
   return
MakeQwerty()
WaitRelease()
MakeDefault()
return



Capslock::Send {LAlt down}{Shift}{LAlt Up}

; ##############################
;         QWERTY MAPPING
; ##############################

*SC0x2::Send {Blind}{1}
*SC0x3::Send {Blind}{2}
*SC0x4::Send {Blind}{3}
*SC0x5::Send {Blind}{4}
*SC0x6::Send {Blind}{5}
*SC0x7::Send {Blind}{6}
*SC0x8::Send {Blind}{7}
*SC0x9::Send {Blind}{8}
*SC0xa::Send {Blind}{9}
*SC0xb::Send {Blind}{0}
*SC0xc::Send {Blind}{-}
*SC0xd::Send {Blind}{=}
*SC0x10::Send {Blind}{q}
*SC0x11::Send {Blind}{w}
*SC0x12::Send {Blind}{e}
*SC0x13::Send {Blind}{r}
*SC0x14::Send {Blind}{t}
*SC0x15::Send {Blind}{y}
*SC0x16::Send {Blind}{u}
*SC0x17::Send {Blind}{i}
*SC0x18::Send {Blind}{o}
*SC0x19::Send {Blind}{p}
*SC0x1a::Send {Blind}{[}
*SC0x1b::Send {Blind}{]}
*SC0x1e::Send {Blind}{a}
*SC0x1f::Send {Blind}{s}
*SC0x20::Send {Blind}{d}
*SC0x21::Send {Blind}{f}
*SC0x22::Send {Blind}{g}
*SC0x23::Send {Blind}{h}
*SC0x24::Send {Blind}{j}
*SC0x25::Send {Blind}{k}
*SC0x26::Send {Blind}{l}
*SC0x27::Send {Blind}{;}
*SC0x28::Send {Blind}{'}
*SC0x29::Send {Blind}{vkC0}
*SC0x2b::Send {Blind}{\}
*SC0x2c::Send {Blind}{z}
*SC0x2d::Send {Blind}{x}
*SC0x2e::Send {Blind}{c}
*SC0x2f::Send {Blind}{v}
*SC0x30::Send {Blind}{b}
*SC0x31::Send {Blind}{n}
*SC0x32::Send {Blind}{m}
*SC0x33::Send {Blind}{,}
*SC0x34::Send {Blind}{.}
*SC0x35::Send {Blind}{/}
*SC0x56::Send {Blind}{vkE2}

#z::
MsgBox, Hello world!
return


Press Win + z (qwerty) to check.
It will work for combinations with Ctrl, Alt and both Win keys.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 2nd, 2010, 4:16 pm 
Offline

Joined: August 28th, 2009, 3:00 pm
Posts: 275
genmce, don't you want it so that rather than having the "y" character trigger the hotkey, you want the "y" key as positioned on a qwerty keyboard to trigger the hotkey? If so, couldn't you just use the SC0x hotkeys like he is using?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 2nd, 2010, 4:35 pm 
Offline

Joined: January 10th, 2009, 1:34 pm
Posts: 135
Location: Virginia
maniac wrote:
genmce, don't you want it so that rather than having the "y" character trigger the hotkey, you want the "y" key as positioned on a qwerty keyboard to trigger the hotkey? If so, couldn't you just use the SC0x hotkeys like he is using?


Yes that is what I want. Huh? I better reread the posts and test.

_________________
KeyMce/GenMce - mackie emulator for pc keyboard/Convert your controller to mackie.
Midi I/O - Want to play with midi/ahk?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 2nd, 2010, 4:45 pm 
Offline

Joined: January 10th, 2009, 1:34 pm
Posts: 135
Location: Virginia
Long Bong wrote:
Quote:
So can it be used to remap hotkeys to a particular layout?

Yes. All the hotkeys will work as on qwerty. To achieve that, you need to place your qwerty hotkeys somewhere in my script. Unless it's Suspend command they will work fine.

Example:
Code:
SetBatchLines -1
SleepDuration = 1
TimePeriod = 1

SC := "SC0x2 SC0x3 SC0x4 SC0x5 SC0x6 SC0x7 SC0x8 SC0x9 SC0xa SC0xb SC0xc SC0xd SC0x10 SC0x11 SC0x12 SC0x13 SC0x14 SC0x15 SC0x16 SC0x17 SC0x18 SC0x19 SC0x1a SC0x1b SC0x1e SC0x1f SC0x20 SC0x21 SC0x22 SC0x23 SC0x24 SC0x25 SC0x26 SC0x27 SC0x28 SC0x29 SC0x2b SC0x2c SC0x2d SC0x2e SC0x2f SC0x30 SC0x31 SC0x32 SC0x33 SC0x34 SC0x35 SC0x56"
StringSplit, SC, SC, %A_Space%

MakeDefault()
return


MakeDefault()
{
   Loop, 48
   {
      sc := sc%A_Index%
      Hotkey, *%sc%, off
   }
}

WaitRelease()
{
   Loop
   {
      If !(GetKeyState("Ctrl")
      or GetKeyState("Alt")
      or GetKeyState("LWin")
      or GetKeyState("RWin"))
         Break
      Sleep, 10
   }
}

MakeQwerty()
{
   Loop, 48
   {
      sc := sc%A_Index%
      Hotkey, *%sc%, on
   }
}


~*Ctrl::
~*Alt::
~*LWin::
~*RWin::
Sleep, 1
If GetKeyState("RAlt") ; This prevents from switching if it was AltGr pressed.
   return
MakeQwerty()
WaitRelease()
MakeDefault()
return



Capslock::Send {LAlt down}{Shift}{LAlt Up}

; ##############################
;         QWERTY MAPPING
; ##############################

*SC0x2::Send {Blind}{1}
*SC0x3::Send {Blind}{2}
*SC0x4::Send {Blind}{3}
*SC0x5::Send {Blind}{4}
*SC0x6::Send {Blind}{5}
*SC0x7::Send {Blind}{6}
*SC0x8::Send {Blind}{7}
*SC0x9::Send {Blind}{8}
*SC0xa::Send {Blind}{9}
*SC0xb::Send {Blind}{0}
*SC0xc::Send {Blind}{-}
*SC0xd::Send {Blind}{=}
*SC0x10::Send {Blind}{q}
*SC0x11::Send {Blind}{w}
*SC0x12::Send {Blind}{e}
*SC0x13::Send {Blind}{r}
*SC0x14::Send {Blind}{t}
*SC0x15::Send {Blind}{y}
*SC0x16::Send {Blind}{u}
*SC0x17::Send {Blind}{i}
*SC0x18::Send {Blind}{o}
*SC0x19::Send {Blind}{p}
*SC0x1a::Send {Blind}{[}
*SC0x1b::Send {Blind}{]}
*SC0x1e::Send {Blind}{a}
*SC0x1f::Send {Blind}{s}
*SC0x20::Send {Blind}{d}
*SC0x21::Send {Blind}{f}
*SC0x22::Send {Blind}{g}
*SC0x23::Send {Blind}{h}
*SC0x24::Send {Blind}{j}
*SC0x25::Send {Blind}{k}
*SC0x26::Send {Blind}{l}
*SC0x27::Send {Blind}{;}
*SC0x28::Send {Blind}{'}
*SC0x29::Send {Blind}{vkC0}
*SC0x2b::Send {Blind}{\}
*SC0x2c::Send {Blind}{z}
*SC0x2d::Send {Blind}{x}
*SC0x2e::Send {Blind}{c}
*SC0x2f::Send {Blind}{v}
*SC0x30::Send {Blind}{b}
*SC0x31::Send {Blind}{n}
*SC0x32::Send {Blind}{m}
*SC0x33::Send {Blind}{,}
*SC0x34::Send {Blind}{.}
*SC0x35::Send {Blind}{/}
*SC0x56::Send {Blind}{vkE2}

#z::
MsgBox, Hello world!
return


Press Win + z (qwerty) to check.
It will work for combinations with Ctrl, Alt and both Win keys.



Can another section for AZERTY added and one for QWERTZ and the translations will happen which every one is selected?
Are the scan codes static for the physical location of the key?
Meaning Y key location on qwerty is a scancode and if the keyboard is qwertz, then Z, because it is in the same physical postion has that same scancode?

I am in the mystery moment, about to learn something, but I have not learned it yet.


qwerty keyboard q = scancode
azerty keyboard a = the same scancode?


Will just using the scancodes as the hotkeys make it so I don't need to worry about differences in layout from qwerty to qwertz or azerty?

Or will I need to use the functions in the script above?

_________________
KeyMce/GenMce - mackie emulator for pc keyboard/Convert your controller to mackie.
Midi I/O - Want to play with midi/ahk?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 2nd, 2010, 4:49 pm 
Offline

Joined: August 28th, 2009, 3:00 pm
Posts: 275
unless I'm missing something, all his functions do is turn the hotkeys on and off, so it appears the scancode refers to the physical location of the key.

edit:
quick research online... VK (virtual key) would have the same value for character q on qwerty and azerty, whereas the scan code is the physical position and has a different value for the character q in those layouts.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 2nd, 2010, 4:58 pm 
Offline

Joined: January 10th, 2009, 1:34 pm
Posts: 135
Location: Virginia
maniac wrote:
unless I'm missing something, all his functions do is turn the hotkeys on and off, so it appears the scancode refers to the physical location of the key.

edit:
quick research online... VK (virtual key) would have the same value for character q on qwerty and azerty, whereas the scan code is the physical position and has a different value for the character q in those layouts.


Does that mean that a in azerty is the same scancode as q in qwerty?
They are in the same physical position.

_________________
KeyMce/GenMce - mackie emulator for pc keyboard/Convert your controller to mackie.
Midi I/O - Want to play with midi/ahk?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 2nd, 2010, 4:59 pm 
Offline

Joined: August 28th, 2009, 3:00 pm
Posts: 275
genmce wrote:
maniac wrote:
unless I'm missing something, all his functions do is turn the hotkeys on and off, so it appears the scancode refers to the physical location of the key.

edit:
quick research online... VK (virtual key) would have the same value for character q on qwerty and azerty, whereas the scan code is the physical position and has a different value for the character q in those layouts.


Does that mean that a in azerty is the same scancode as q in qwerty?
They are in the same physical position.


righto


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Error on line 59
PostPosted: April 20th, 2010, 9:54 pm 
When I run the script, I get an error on line 59.
Line text{Blind}{{}
Error: this line does not contain a recognized action.
The program will exit.

any advice?
Thank you.


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 36 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 11 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group