Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Help needed !



  • Please log in to reply
3 replies to this topic
homer_simpson
  • Members
  • 40 posts
  • Last active: Jul 11 2014 08:24 AM
  • Joined: 15 Nov 2012
Hello again,
Have two questions with respet to a key remapping.

I'm using a german keyboard and I'd like to remap a kew special characters
The german layout foresees on a key '(under shift) and #
and another key °(under shift) and ^
I would like to invert and swap the keys, resulting

^ <--> '
° <--> #

What I write is:

$^::'
$'::°
$#::^
$°::#


Everything works, apart the character #: when I press ° I keep getting a '
Any suggestion?

Second question:
Is there the way to make a key remap under a condition (i.e. an enable variable) ?
I tried something so

$^:: gosub remap
remap:
if enable
Send '
else
Send ^
return

but I have a lot of problems with it


Thanks a lot, Marco

DanT3hMan
  • Members
  • 30 posts
  • Last active: Sep 18 2013 07:45 PM
  • Joined: 07 Oct 2012
✓  Best Answer
For your first question I'm not quite sure, but for the second one, this is what I think would work:

numpad2::              ; Replace with the button you want to toggle it
    If enable = true
        enable = false
    else 
        enable = true
return

$^::
    If enable = true
        Sendraw '
    else
        Sendraw ^           ;Use Sendraw incase the key is a special one like ^,!,#,ect
return



homer_simpson
  • Members
  • 40 posts
  • Last active: Jul 11 2014 08:24 AM
  • Joined: 15 Nov 2012
Thank youDanT3hMan,
it works !!!

But how's it with Shift of Caps Lock ?? (I would like to remap them under enable too, something like Capslock::Shift)

If I type Sendraw Shift what I get are the "Shift" letters, not just the key Shift pressed...

Thanks again, Marco

DanT3hMan
  • Members
  • 30 posts
  • Last active: Sep 18 2013 07:45 PM
  • Joined: 07 Oct 2012
For Shift, instead of doing SendRaw, do Send + The '+' is the sign for shift, like '^' is for ctrl or '!' for alt