AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Trouble getting alt gr to agree with me

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
qleblat
Guest





PostPosted: Thu Jul 17, 2008 11:02 am    Post subject: Trouble getting alt gr to agree with me Reply with quote

Hi folks. I'm using a swedish keyboard where you write a backslash using alt gr and the plus key. I'm trying to change the order of this so "+" sends "\" without modifiers and "+" with the alt gr modifier.

My code looks like this:

Code:

+\::Send ?
<^>+::Send +
+::Send \


Where did this boy go wrong?

Also, is it possible to let the script open itself? For fast edits and so on. I guess it would be interesting to write a function that appends new hotkeys and abbrivations to the file it self. On-the-fly and other insect related things people say.

Thanks! Blame misstypes and other language weirdness on my swedish hertige. Wink
Back to top
tonne



Joined: 06 Jun 2006
Posts: 1163
Location: Denmark

PostPosted: Thu Jul 17, 2008 11:40 am    Post subject: Reply with quote

Maybe this workaround helps:
Code:
; use * to catch any modifiers
*+::
  ; AltGr
  If (GetKeyState("RALT") && GetKeyState("LCTRL"))
    SendRaw +
  ; Shift
  Else If (GetKeyState("SHIFT"))
    SendRaw ?
  Else
    SendRaw \
return

Any combination not taken hand of sends "\".
_________________
there's a dog barking close within the range of my ear
sounds like he wants to escape the chain
he would probably bite me to death if he could
but the chain lets me spit in his face

- Kashmir
Back to top
View user's profile Send private message
qleblat
Guest





PostPosted: Thu Jul 17, 2008 12:00 pm    Post subject: Reply with quote

Thanks, exactly what I was looking for, works like a charm.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group