topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Friday November 8, 2024, 8:44 pm
  • 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: £ on a non-uk keyboard  (Read 8060 times)

mediaguycouk

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 247
    • View Profile
    • Mediaguy
    • Donate to Member
IDEA: £ on a non-uk keyboard
« on: August 16, 2009, 07:47 AM »
I was hoping someone could write a simple AHK script for me.

All I need is that when Alt-GR + 3 is pressed then a £ is sent (send ASC 0163)
Learning C# - Graham Robinson

cyberdiva

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,041
    • View Profile
    • Donate to Member
Re: IDEA: £ on a non-uk keyboard
« Reply #1 on: August 16, 2009, 10:39 AM »
If your keyboard has a numeric keypad, wouldn't it be just as easy to hold down the ALT key and press 0163?  This is the method I use all the time, not just for £ and € but also for non-English characters such as é, ü, ¿, and ç.
« Last Edit: August 16, 2009, 10:42 AM by cyberdiva »

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: IDEA: £ on a non-uk keyboard
« Reply #2 on: August 16, 2009, 10:53 AM »
this should work but as i don't have an AltGr key, i can't test it. (it works with with Alt+3). so try both left & right Alt keys and let me know. :)

SendMode, Input

; <^>! stands for AltGr
<^>!3::
!3::
     Send, {ASC 0163}
Return

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 8,069
    • View Profile
    • Donate to Member
Re: IDEA: £ on a non-uk keyboard
« Reply #3 on: August 16, 2009, 01:12 PM »
Yep - works fine on my keyboard.

mediaguycouk

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 247
    • View Profile
    • Mediaguy
    • Donate to Member
Re: IDEA: £ on a non-uk keyboard
« Reply #4 on: August 16, 2009, 01:47 PM »
The idea was for someone with a laptop (hence doesn't really have a numpad to type it in), however I suppose a laptop won't have a AltGr key either will it :(

Thanks for this.
Learning C# - Graham Robinson

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: IDEA: £ on a non-uk keyboard
« Reply #5 on: August 16, 2009, 07:31 PM »
if your friend's laptop doesn't have a AltGr key, they can use the Alt+3 combination instead.

mediaguycouk

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 247
    • View Profile
    • Mediaguy
    • Donate to Member
Re: IDEA: £ on a non-uk keyboard
« Reply #6 on: August 17, 2009, 01:50 AM »
does the <^>! command need to change to use normal alt?

(Many thanks for this btw)
Learning C# - Graham Robinson

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: IDEA: £ on a non-uk keyboard
« Reply #7 on: August 17, 2009, 03:36 AM »
you don't have to change, unless you want to.. :) if AltGr key isn't available, this line <^>! is just ignored, as the normal alt (!) can be used to send the ascii code.

P.S. if you work with accented characters a lot, take a look at Skrommel's Accents script. it provides an easy way to define more characters.

mediaguycouk

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 247
    • View Profile
    • Mediaguy
    • Donate to Member
Re: IDEA: £ on a non-uk keyboard
« Reply #8 on: August 17, 2009, 03:38 AM »
P.S. if you work with accented characters a lot, take a look at Skrommel's Accents script. it provides an easy way to define more characters.

I sent it to the entire University of Southampton modern languages department a year or so ago but Sophos kept calling it a virus, so I gave up :(
Learning C# - Graham Robinson

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: IDEA: £ on a non-uk keyboard
« Reply #9 on: August 17, 2009, 03:47 AM »
yes, false alarms are the bane of AHK scripts but you can always write a letter to Sophos regarding this problem.