ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA: Keyboard locale auto-switcher?

<< < (4/4)

lanux128:
thanks Armando, i'm glad that you find it useful plus it is very nice to start the day with such a compliment.. :)

PPLandry:
I've always had problems with my keyboard changing from French to English-Armando (November 10, 2007, 08:02 PM)
--- End quote ---

Many years ago, I got used to the US International keyboard layout. More double-keystoke characters, but it is so complete and matches perfectly with the keycaps. I use it for whatever language I write in (of course, I don't write in Chinease, only in French, English and German)

uuderzo:
Lanux, thank you for your hint...

I copied from the source of your app and changed this way:

#InstallKeybdHook
ifWinActive, ahk_class Photoshop
{

è::
SetLayout( 00000409 )
Send, [
SetLayout( 00000410 )
Return

+::
SetLayout( 00000409 )
Send, ]
SetLayout( 00000410 )
Return

}

SetLayout(Locale) {
  DllCall("LoadKeyboardLayout", Str, %Locale%, UInt, 257)
}

Now Photoshop looks like it understands the command, but it does not revert to italian layout after Send command (i love being able to write text with correct keys, you know)... what should I check?

Thank you!

lanux128:
Lanux, thank you for your hint...
...
Now Photoshop looks like it understands the command, but it does not revert to italian layout after Send command (i love being able to write text with correct keys, you know)... what should I check?-uuderzo (June 04, 2010, 08:38 AM)
--- End quote ---

try adding a '$' before the hotkey like the code below. i also changed the IfWinActive directive to be controlled by the keystroke instead of the other way around. let me know if this works.. :)


--- ---#InstallKeybdHook

$è::
IfWinActive, ahk_class Photoshop
  {
  SetLayout( 00000409 )
  Send, [
  }
Else
  {
  SetLayout( 00000410 )
  Send, è
  }
Return

$+::
IfWinActive, ahk_class Photoshop
  {
  SetLayout( 00000409 )
  Send, ]
  }
Else
  {
  SetLayout( 00000410 )
  Send, +
  }
Return

SetLayout(Locale) {
  DllCall("LoadKeyboardLayout", Str, %Locale%, UInt, 257)
}

Navigation

[0] Message Index

[*] Previous page

Go to full version