DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: IDEA: £ on a non-uk keyboard  (Read 10,103 times)

mediaguycouk

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 247
IDEA: £ on a non-uk keyboard
« on: August 16, 2009, 12:47 PM »
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
Re: IDEA: £ on a non-uk keyboard
« Reply #1 on: August 16, 2009, 03:39 PM »
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, 03:42 PM by cyberdiva »

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • Coding Snacks
    • Volunteers/Staff
    • Gathering Badge
    • Participated in NANY Challenge Once
    • Linux User
Re: IDEA: £ on a non-uk keyboard
« Reply #2 on: August 16, 2009, 03:53 PM »
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. :)

Code
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,073
    • Cody Award
    • Furry Fandom Badge - Furry Fandom
Re: IDEA: £ on a non-uk keyboard
« Reply #3 on: August 16, 2009, 06:12 PM »
Yep - works fine on my keyboard.

mediaguycouk

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 247
Re: IDEA: £ on a non-uk keyboard
« Reply #4 on: August 16, 2009, 06: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
    • Coding Snacks
    • Volunteers/Staff
    • Gathering Badge
    • Participated in NANY Challenge Once
    • Linux User
Re: IDEA: £ on a non-uk keyboard
« Reply #5 on: August 17, 2009, 12:31 AM »
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
Re: IDEA: £ on a non-uk keyboard
« Reply #6 on: August 17, 2009, 06: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
    • Coding Snacks
    • Volunteers/Staff
    • Gathering Badge
    • Participated in NANY Challenge Once
    • Linux User
Re: IDEA: £ on a non-uk keyboard
« Reply #7 on: August 17, 2009, 08: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
Re: IDEA: £ on a non-uk keyboard
« Reply #8 on: August 17, 2009, 08:38 AM »
Quote
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
    • Coding Snacks
    • Volunteers/Staff
    • Gathering Badge
    • Participated in NANY Challenge Once
    • Linux User
Re: IDEA: £ on a non-uk keyboard
« Reply #9 on: August 17, 2009, 08:47 AM »
yes, false alarms are the bane of AHK scripts but you can always write a letter to Sophos regarding this problem.

Original address: https://www.donationcoder.com/forum/index.php?topic=19544.0