AutoHotkey Community

It is currently May 27th, 2012, 6:00 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: September 26th, 2010, 8:01 pm 
Offline

Joined: September 26th, 2007, 11:18 pm
Posts: 101
Hi

Code:
#IfWinActive, Microsoft Word
Ralt:: Send, {SHIFTDOWN}`{SHIFTUP}
#IfWinActive


IN SHORT
The above doesn't work. How to correct it?


The long story
It is meant to simplify typing local Polish characters. Normally CTRL+ALT+letter makes a king of our local umlaut.

Another way is press and hold right alt instead.

In either case there are two downsides: it collides with function shortcuts of many programs and after many years I still do not like either.

The third way is to press and release shift+Tilde. Then press the key. Not very comfortable key combination, but you don't have to hold it. So I'd like to utilize the concept by pressing and releasing one key - could well be Ralt.

I hope it makes sense :)


Greetings
T


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 26th, 2010, 8:19 pm 
Offline

Joined: September 26th, 2007, 11:18 pm
Posts: 101
`:: Send ~

works

but

Ralt:: Send ~

Doesnt. Why?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 26th, 2010, 8:21 pm 
Offline
User avatar

Joined: November 2nd, 2008, 4:23 pm
Posts: 2906
Location: 127.0.0.1
Does 'Alt::Send ~' work?

_________________
aboutscriptappsscripts
Any code ⇈ above ⇈ requires AutoHotkey_L to run


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 26th, 2010, 9:51 pm 
Offline
User avatar

Joined: October 31st, 2008, 9:39 am
Posts: 641
Location: France
Try this please, be carefull with Ralt ( or altGr ) , generaly it's a special key that send or wait multiple key event... depends of language , layout , keyboard, et caetera... I have the same problem problem with my french keyboard however it's work with this feature ( Ralt up )
Code:
Ralt up:: send ~


more mysterious and complicated, tilde can be a deadkey ( diacritic ) so we need some thing like this ( don't interfer with Ralt and simulat a double deadkey )
Code:
~*Ralt:: send {Ralt up}~~{BS}


an other solution it's to use ASCii and ( or not virtual key )
Code:
*VKA5:: send {ASC 126}


Therefore, the best solution ( for my case ) is this: (discard alt(menu) problem, diacritic, accent, and other... )
Code:
~RAlt Up:: send {ASC 126}
or
Code:
~*Ralt:: send {ASC 126}


If your keyboard layout has an AltGr key instead of a right-Alt key, use <^>! instead of RAlt ... Other thing we need * before Ralt because ( for my case ) RAlt simulat control+alt ( so it's a double key : Wildcard: Fire the hotkey even if extra modifiers are being held down. This is often used in conjunction with remapping keys or buttons )


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 27th, 2010, 8:03 am 
Offline
User avatar

Joined: October 31st, 2008, 9:39 am
Posts: 641
Location: France
Your request push me to write this http://www.autohotkey.com/forum/viewtopic.php?t=62979
maybe an idea for you too

some polish code: alt + 0104 for example
http://adsorption.org/awm/info/pl-codes.htm


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 27th, 2010, 12:07 pm 
Offline

Joined: September 26th, 2007, 11:18 pm
Posts: 101
@Frankie
no, alt function does not get overridden, so if I press Alt, it highlights the function bar and keyboard becomes a function trigger.
Thus pressing alt s triggers find function.

@Zaelia

~RAlt Up:: send {ASC 126} causes no difference to Raltup

~*Ralt:: send {ASC 126} makes ralt behave like lalt


Now,
c:: send {ASC 126}
results in c outputting ~

If followed by a letter, doesn't give effect.

No surprise, because pressing shift+Tilde does not output a ~ character, it only works as a one-time caps lock-like key.



As for the routine that you wrote (thank you), so far I can tell that pressing and releasing ralt followed by numpad digits results in just the digits being input. That said, I will need more time to study its structure.

Greetings

T


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 27th, 2010, 1:37 pm 
Offline
User avatar

Joined: October 31st, 2008, 9:39 am
Posts: 641
Location: France
Quote:
If followed by a letter, doesn't give effect

Alt+126 is a "pure" tilde ( the tilde printable character), therefore just to use send ~ for your desire effect .However deadkey( a key than load an accent or an option without a printable char at first push ) work only if the tilde key is present (it's your case) in your keyboard, Else you need to use a double WM_KeyDown message in the window keyboard buffer... it's complicated...
And after this, tilde(DK) + leter gives the good result only if the final character is avaible in your keyboard layout. send unicode is a good solution I think :(


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 27th, 2010, 5:04 pm 
Offline
User avatar

Joined: October 31st, 2008, 9:39 am
Posts: 641
Location: France
this script work as you want ?
Code:
RAlt & a:: Symbol("0105", "0104")
RAlt & c:: Symbol("0107", "0106")
RAlt & e:: Symbol("0119", "0118")
RAlt & l:: Symbol("0142", "0141")
RAlt & n:: Symbol("0144", "0143")
RAlt & o:: Symbol("00F3", "00D3")
RAlt & s:: Symbol("015B", "015A")
RAlt & x:: Symbol("017A", "0179")
RAlt & z:: Symbol("017C", "017B")
RAlt & u:: Symbol("20AC", "20AC")


Symbol(min="", maj="") {
code:=(GetKeyState("CapsLock", "T") ^ GetKeyState("shift")) ? maj : min
VarSetCapacity(event, 56, 0)
NumPut(1, event, 0), NumPut("0x" code, event, 6, "UShort"), NumPut(4, event, 8)
NumPut(1, event, 28), NumPut("0x" code, event, 34, "UShort"), NumPut(6, event, 36)
DllCall("SendInput", "uint", 2, "uint", &event, "int", 28)
}


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: 0x150||ISO, batto, Bing [Bot], dra, HotkeyStick, mKnight, sjc1000, Wicked, XstatyK and 62 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