topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday April 19, 2024, 10:11 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: Remap keyboard press value for -one- application  (Read 5553 times)

ugo

  • Participant
  • Joined in 2005
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
IDEA: Remap keyboard press value for -one- application
« on: March 03, 2006, 02:03 AM »
Hi, maybe it's a stupid idea but...

On an italian keyboard (that's it: I'm from Italy!), the decimal separator is "," and not ".".
I have a couple of applications that don't recognize correctly the "." on the numeric pad and don't let me use it for decimals.
At the meantime, obviously, I don't want to remap the "." to "," for -all- apps!!!
So what I would need is a keyboard remapper able to understand "what application is on focus" before chenging the keyboard value...

...is there something around there (or can be easily made) which can do this???

thnks in advance.
bye
ugo


« Last Edit: March 03, 2006, 02:41 AM by brotherS »

wr975

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 369
    • View Profile
    • Donate to Member
Re: IDEA: Remap keyboard press value for -one- application
« Reply #1 on: March 03, 2006, 03:00 AM »
A simple AutoHotkey Script could do it for you.

In this example applications "Slimbrowser" and "Whatever" will get a comma if you press NumpadDot. All other applications still get a dot.

Just adapt this example, or wait if someone codes something better... ;-)

NumpadDot::
IfWinActive, ahk_class SlimBrowser MainFrame
{
     send,,
     return
}

IfWinActive, whatever
{
     send,,
     return
}

send,.
return

Used commands for reference:

http://www.autohotke...com/docs/Hotkeys.htm
http://www.autohotke...ands/IfWinActive.htm
http://www.autohotke...cs/commands/Send.htm
http://www.autohotke.../commands/Return.htm


brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,260
    • View Profile
    • Donate to Member
Re: IDEA: Remap keyboard press value for -one- application
« Reply #2 on: March 03, 2006, 03:07 AM »
I'm using this code to remap the standard "," that I have in my keyboard layout to "." on demand! Very helpful:

;2005-11-24
;remap Ctrl-NumpadDot to produce .
#Persistent
^NumpadDot::
Send .
return

ugo

  • Participant
  • Joined in 2005
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Re: IDEA: Remap keyboard press value for -one- application
« Reply #3 on: March 03, 2006, 03:58 AM »

>A simple AutoHotkey Script could do it for you

Wonderful!!!
Great idea.

The only trouble with your script is that it seems to gain a loop:
the last "send ,." causes the script being executed again...
what else can I do insted?

thnx again

bye
ugo

ugo

  • Participant
  • Joined in 2005
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Re: IDEA: Remap keyboard press value for -one- application
« Reply #4 on: March 03, 2006, 04:57 AM »
Found!!!!

I must test WinActive first and the key second!!!!

#IfWinActive MyWindow
NumpadDot::
send,,
return

thnks again everyone.