Hello,
I am doing at least my first steps in programing. I managed to remap my keyboard and write a script to click in a button-matrix.
But I cant find the way for the last step. I must first describe what I am trying to do:
I use a sampler, here a pict of the gui:
<!-- m -->http://www.softart.n... ... 20ext2.png<!-- m -->
- Selecting the buttons with the keyboard is ok, using just MouseClick Var, Var , some offset and Init Variables and expressions
- Selecting the Button-Matrix with numerals 1-30 in the middle with two keys (one for increment/one for decrement) is ok too.
- the two trapezoidal figures in the middle are my problem. There are loudness-pedals (for a part of the organ), and there is no doable midi or usb pedal with electronic parts i can find here. And electronic, honestly... Thats why AHK is for me THE solution.
So my idea is to Click these pedals pixel by pixel, this works fine with one key, but I need an increment/decrement with two keys to connect to a DIY Pedal. 2 reed-switches are connected to the two keys of a 2nd keyboard, lets say y and b. When the pedal goes in a direction, the physical Hotkey is b & y, in the other direction y & b. Now, I have no key left, so I need to use y for smthg else and b too. This is still ok.
Here comes the problem: when the pedal stays between b and y and another hotkey is used, the engaged switch, lets say b, is forgotten. Logically it is b Down, but b Down doesnt exit in AHK. Moving the pedal again sends of course the second contact alone, lets says y, that is bad since it selects a stop.
So I tried with
y::etc
b::etc
b & y::etc
y & b::etc
this is what works best for sending the undesired effect.
I tried with
b::tmp = b
y::tmp = y
b up::the desired hotkey for b
y up::the desired hotkey for y
b & y::calling the variables
y & b:: ...
The b Up and x Up take the overhand
I tried with GetKeyState and WaitKey, but here also one takes the overhand.
Using :*:by::etc
is not the solution.
I can also send the two desired sequences with a hard solution (with relays) but there must be a soft-solution.
Got an idea?
[Moved from Scripts - tidbit]
Need idea help for a simulated Mouse
Started by
alicuota
, May 19 2012 11:28 PM
3 replies to this topic
#1
Posted 19 May 2012 - 11:28 PM
#2
Posted 20 May 2012 - 03:47 AM
Hi alicuota, welcome to the forum.
I see you have already been "giving back" in another thread.
I don't have any immediate answers but I did want to ask a few questions.
Perhaps the questions an answers will help with a solution.
Instead of b & y or y & b you could wire your DIY pedals to separate switches.
Btw, with all those controls, are you 'empty' of keyboard combinations ?
How are you selecting or deselecting each of the large white buttons.
ex: (on the left side) Krumhorn 8" .......Principal 16"
How are you pressing the 33 black and 23 white keys of the 3 keyboards in the center ?
How are you pressing the keys below the trapezoidal figures ?
I see you have already been "giving back" in another thread.
I don't have any immediate answers but I did want to ask a few questions.
Perhaps the questions an answers will help with a solution.
Where is "here" ? Did you know that game joysticks typically have buttons and that AHk can read those buttons ?There are loudness-pedals (for a part of the organ), and there is no doable midi or usb pedal with electronic parts i can find here.
Instead of b & y or y & b you could wire your DIY pedals to separate switches.
Btw, with all those controls, are you 'empty' of keyboard combinations ?
How are you selecting or deselecting each of the large white buttons.
ex: (on the left side) Krumhorn 8" .......Principal 16"
How are you pressing the 33 black and 23 white keys of the 3 keyboards in the center ?
How are you pressing the keys below the trapezoidal figures ?
#3
Posted 20 May 2012 - 12:43 PM
Dear Leef_me,
- the keyboards are midi-inputs (the buttons at the bottom (a midified church-organ pedal) and the keyboards in the middle), comes in through USB
- all round buttons (big and little) are clicked from the Computer-keyboard. All is remapped, mostly in the form of
a::Click there
with some a & s::Click there
&-Hotkeys are all made of horizontal neighbour keys to be pressed with one hand. I have plenty of HK free that are distant from at least one key or are neighbours in vertical direction. The idea is that the most stops are toggled with a simple key, less used stops are &-HK. And really all the keyboard is remapped. I bought two omegas, without power key to avoid the power-key remapping problem and really use the full KB.
Joystick... what will cost this... probably more than than the 15 5volts relays i would need for two swell pedals. But that would made clicke-clicke-clicke when used and consume much power.
I understand that the solution is to identify that a key has been pressed down and this send the order, while raise it would do nothing.
b Down::
A_idleTime > 200 ; hopping that this doesnt consider midi-inputs and other interrupts
Mouseclick there ; one the Swell pedal / trapezoidal thing
Return
b & y::
Same as b Down
b::click a Stop ; big white button
b Up::Do noooothing
Then the same for y and y & b:: ...
The problem is how to code b Down?
- the keyboards are midi-inputs (the buttons at the bottom (a midified church-organ pedal) and the keyboards in the middle), comes in through USB
- all round buttons (big and little) are clicked from the Computer-keyboard. All is remapped, mostly in the form of
a::Click there
with some a & s::Click there
&-Hotkeys are all made of horizontal neighbour keys to be pressed with one hand. I have plenty of HK free that are distant from at least one key or are neighbours in vertical direction. The idea is that the most stops are toggled with a simple key, less used stops are &-HK. And really all the keyboard is remapped. I bought two omegas, without power key to avoid the power-key remapping problem and really use the full KB.
Joystick... what will cost this... probably more than than the 15 5volts relays i would need for two swell pedals. But that would made clicke-clicke-clicke when used and consume much power.
I understand that the solution is to identify that a key has been pressed down and this send the order, while raise it would do nothing.
b Down::
A_idleTime > 200 ; hopping that this doesnt consider midi-inputs and other interrupts
Mouseclick there ; one the Swell pedal / trapezoidal thing
Return
b & y::
Same as b Down
b::click a Stop ; big white button
b Up::Do noooothing
Then the same for y and y & b:: ...
The problem is how to code b Down?
#4
Posted 21 May 2012 - 12:02 PM
Thanks again, I found a solution. Hacking hard the chip of the keyboard, I found the multimedia commands that dont exist physically but are built-In. And there are plenty of them. Thats the way.




