From the original SynthMaker forum (2004–2014), with its members’ names and dates.
lalo ·
Hi guys!
try to do a
string-->IsKeyPressed-->string
if you put a letter (i.e. an h) in the leftmost string the right most will show 'true'
if you then take the focus away from the left edit the right one will show false even if you press the 'h'...and the value wont change..
if you delete the letter in the leftmost string and you put another one in it and then you take away focus from the whole SM app, the right-most string will show always 'True' even if you press another letter
maybe a bug here..on in the string module?
lalo
lalo ·
yup ..seems a bug in key-pressed module...
it only works when the input string edit box is in 'edit' mode...
stops workin if the input string box hasn't focus
lalo
unkargherth ·
Try to connect a Tick25 to string input
Tom7777 ·
is key pressed .....
A topic on this its not a bug really just depends on how you use it.
infuzion ·
Bug verified, & repeatable.
Didn't get anything using a blank, just always "False".
Used the coarse fine knob.osm from the link above, & connected a Data::String, & always got false. Connected an Out from that sub-module all the way up, & still always got False, even though CTRL worked at slowing the value change. Even tried a Flow::String Select, & still always False value.
still buggy in _q
malc ·
This is obviously causing some confusion. This isn't a bug. The Is Key Pressed component does not respond to key presses. It's purpose is to allow you to test if, at the time of asking, a particular key is pressed or not. So pressing a key will not change the value sent to the output of this component.
Tom came up with a way of using the Is Key Pressed to send a trigger when the key is actually pressed. However, this is just a clever workaraound and we should have dedicated components for doing this. The only reason they are not there yet is that keyboard input requires a focus to determine where the messages are sent and we're still thinking through how we're going to do this.
lalo ·
thanx guys and malc 🙂
i didn't though about this cause i didn't see any trigger input in the IsKeyPressed 😉
i'm after to do gui controls being tweaked at an higher resolution with a combination of ctrl+drag ....
i'll wait till the new IsKeypressed will be here 🙂
'cause i noticed wTimers is a bit heavy on cpu and it tends to slow things a bit
lalo
malc ·
Won't the Is Key Pressed do that for you lalo? Did you look at the coarse fine knob.osm example?
lalo ·
malc wrote: Won't the Is Key Pressed do that for you lalo? Did you look at the coarse fine knob.osm example?
nope i've not seen that ..i'll search for it 🙂
thanx malc
lalo
unkargherth ·
malc wrote: Tom came up with a way of using the Is Key Pressed to send a trigger when the key is actually pressed. However, this is just a clever workaraound and we should have dedicated components for doing this. The only reason they are not there yet is that keyboard input requires a focus to determine where the messages are sent and we're still thinking through how we're going to do this.
An idea here. Instead of getting the key pressed, could be posible to have a process scanning the keyboard matrix that sends a trigger WHEN ANY key is pressed and input this trigger to current "IsKeyPressed" module. or, Perhaps could output some code that include the combination of all keys pressed at given moment. something like 8 bits for the standard keys+ 1 bit for every "combo key" ( shift control,alt,etc)
I explain. I remeber that there's a "Hard" way to scan the keyboard without using the Standard Windows API for it ( sorry don't ask for details, i only know the concept). This way you can bypass the "focus" system
malc ·
Hi unk,
I was a bit brief in my explaination. It's no problem getting the key up and key down messages. What we need is a mechanism for deciding where those messages go. A good way to do this is to have the concept of focus and whatever has the focus gets the key messages but nothing else.
For example, say you had a slider that you wanted to respond to cursor key movements for fine tuning. If you had several of these in a front panel you wouldn't want them all to respond to the cursor keys at the same time. So by making it so that the last one you click has focus you identify the slider that gets the messages.
I think this is the way to go and we just need to find a good way to implement it. Ideally you the developer would have control over how the focus is set and managed.
I hope this explains things better 🙂
unkargherth ·
Mmmm kinda mouse area, true?. I mean, when some module gets focus (user is edditin, for example) key events are notified only to this module, true?
Then, let me ask. What happens when two or more modules gets the focus ?
I think a good way to solve it is applying the View Philosophy fro key events. Key message are passes through a specific module ( alla MGUI)
And the user decides where to send it. Obviously this requires small mod's in some modules ( text, textedit,and so on). but i think it would be the easiest way for you to code and allow user manage key messages
Only an opinion, of course
Wrote something here? To have a post removed or your name hidden, write to [email protected].