Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Holding key down
#1
Hello

I'm new to this program. I wan't to use it with photoshop, and needs to remap a second keyboard (which I have found out how to do). I now need to make a button hold, until i release it again. I know it repeats until i release the pressed button, but it does not work the way it is supposed.

When you fx press the r key in photoshop, and hold it down, it switched to the rotate canvas tool, when r is released it jumps back to the last used tool. When i remap a key to the r key, and hold this key it does not jump back to the last tool. I guess that quick macro just repeat the maped key, instead of holding it down. How could i make this work correct?

Anders
#2
After some testing it seems like the simple code

key+ r

should do the trick, however, when this macro is used it works in notepad, but in photoshop it does not. When the macro is run the r key is pressed and hold, like it should be, but when released nothing happens. If I then press outside photoshop and click on the canvas again, the key is released. It is like for some reason photoshop keeps the macro running and does not detect that it ended before there is clicked outside photoshop. Is the a common problem, or am I doing it wrong?

Anders
#3
Try this. It works only if not using low-level keyboard hook; look in Options -> Triggers.

Macro Macro2605
Trigger F8     Help - how to add the trigger to the macro
Code:
Copy      Help
spe 50 ;;wait 50 ms after key
rep
,key+ r
,if(!ifk(F8)) break
key- r
#4
Hello, thank you very much, it didn't work completely but if you write

Code:
Copy      Help
spe 50 ;;wait 50 ms after key
key+ r
rep
,if(!ifk(F8)) break
key- r

it works perfectly. Thanks again


Forum Jump:


Users browsing this thread: 1 Guest(s)