Jump to content


Photo

Show message when changing keyboard layout !


  • Please log in to reply
3 replies to this topic

#1 Toon

Toon
  • Members
  • 3 posts

Posted 30 April 2012 - 09:58 AM

Hi, I want to show a message (or even better also generate a beep?) when I press combination Shift+Alt in Windows in order to change keyboard layout.

I tried this (being a newbie!):
~+!::Msgbox Keyboard layout has been changed!

but nothing seems to happen.
Help!
many thanks

#2 Toon

Toon
  • Members
  • 3 posts

Posted 30 April 2012 - 11:14 AM

To clarify, this e.g. does work

~RButton::
SoundBeep 750, 1000
MsgBox You pressed rightmouse buttonµ
return

But if I use ~+!:: (or ~+!::) nothing happens (no error, either)

HELP!

thx

#3 JSLover

JSLover
  • Members
  • 920 posts

Posted 30 April 2012 - 11:19 AM

When creating a Hotkey, the last key mentioned is the main target of the Hotkey. With "+!::", you were creating the Hotkey "Shift+Exclamation point", instead of "Shift+Alt".

So, when creating a Hotkey, using only modifiers, use the symbol for one of them & the name of the key for the other...

~+Alt::msgbox, Keyboard layout has been changed!
...also order matters (+Alt vs !Shift), so you may want both...

~+Alt::
~!Shift::
msgbox, Keyboard layout has been changed!
return


#4 Toon

Toon
  • Members
  • 3 posts

Posted 30 April 2012 - 12:03 PM

Many Thx, JSLover - works indeed :p