Geting strange key combinations
how to catch strange combinations of hotkeys, like f1+enter? thanks, sorry by my babelfish english :-) _______________________________________________________ Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora! http://br.mobile.yahoo.com/mailalertas/
Do you mean, how to get the kea codes?
Just start the examples/hid/kb.ck and watch your Console Monitor...
Does it help?
T
2006/10/17, Hilquias.Abreu
how to catch strange combinations of hotkeys, like f1+enter?
thanks, sorry by my babelfish english :-)
_______________________________________________________ Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora! http://br.mobile.yahoo.com/mailalertas/
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
ok, but can chuck get combinations like "enter+f1"? the return is ascii of "f1" or "enter". exist a workarround for this? Tasmo escreveu:
Do you mean, how to get the kea codes? Just start the examples/hid/kb.ck and watch your Console Monitor...
Does it help? T
2006/10/17, Hilquias.Abreu
: how to catch strange combinations of hotkeys, like f1+enter?
thanks, sorry by my babelfish english :-)
_______________________________________________________ Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora! http://br.mobile.yahoo.com/mailalertas/
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________________ Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora! http://br.mobile.yahoo.com/mailalertas/
On 10/19/06, Hilquias.Abreu
ok, but can chuck get combinations like "enter+f1"? the return is ascii of "f1" or "enter". exist a workarround for this?
I don't think so, if keyb.ck doesn't give a unique return for some combination it's not available. Neither Enter nor F1 are modifier keys (like shift, alt, alt gr and ctrl) so it's not possible to detect wether one is pressed while the other is held. All you get is a signal for F1 getting pressed followed by a train of the same at your keyboard repeat rate. What you could try is seeing wether one signal comnes in within n milliseconds of the other which doesn't sound like much fun to me. Do you realy absolutely need that key combo? for example shift + the function keys works fine and is easy to deal with. Kas.
Yes, it should be possible with HidIn and HidIn.openKeyboard(), but probably not KBHit. Keyboard input through HidIn tells you when a key is pressed and then when it is released. So you could have a loop that waits for "f1" or "enter" to be pressed. When one of these keys is pressed, it would continue to another loop, which would wait until either the first key was released, or the next key is pressed. You could probably generalize this for arbitrary combinations of two keys if you wanted. Note that HidIn doesn't return ASCII values, but rather platform- dependent keycodes, so you have to test with examples/hid/kb.ck to find out what f1 and enter are exactly. Also, HidIn won't work with keyboards under Linux until the next ChucK release. spencer On Oct 19, 2006, at 11:30 AM, Hilquias.Abreu wrote:
ok, but can chuck get combinations like "enter+f1"? the return is ascii of "f1" or "enter". exist a workarround for this?
Tasmo escreveu:
Do you mean, how to get the kea codes? Just start the examples/hid/kb.ck and watch your Console Monitor...
Does it help? T
2006/10/17, Hilquias.Abreu
: how to catch strange combinations of hotkeys, like f1+enter?
thanks, sorry by my babelfish english :-)
_______________________________________________________ Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora! http://br.mobile.yahoo.com/mailalertas/
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________________ Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora! http://br.mobile.yahoo.com/mailalertas/
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
On 10/19/06, Spencer Salazar
Yes, it should be possible with HidIn and HidIn.openKeyboard(), but probably not KBHit.
Keyboard input through HidIn tells you when a key is pressed and then when it is released.
Wow, that's quite interesting, I hadn't realised that difference, thanks! Kas.
wow, really cool. but i can't find method openKeyboard in HidIn. Also, no one reference of openKeyboard() in manual. thaks for the patience. Spencer Salazar escreveu:
Yes, it should be possible with HidIn and HidIn.openKeyboard(), but probably not KBHit.
Keyboard input through HidIn tells you when a key is pressed and then when it is released. So you could have a loop that waits for "f1" or "enter" to be pressed. When one of these keys is pressed, it would continue to another loop, which would wait until either the first key was released, or the next key is pressed. You could probably generalize this for arbitrary combinations of two keys if you wanted.
Note that HidIn doesn't return ASCII values, but rather platform- dependent keycodes, so you have to test with examples/hid/kb.ck to find out what f1 and enter are exactly. Also, HidIn won't work with keyboards under Linux until the next ChucK release.
spencer
On Oct 19, 2006, at 11:30 AM, Hilquias.Abreu wrote:
ok, but can chuck get combinations like "enter+f1"? the return is ascii of "f1" or "enter". exist a workarround for this?
Tasmo escreveu:
Do you mean, how to get the kea codes? Just start the examples/hid/kb.ck and watch your Console Monitor...
Does it help? T
2006/10/17, Hilquias.Abreu
: how to catch strange combinations of hotkeys, like f1+enter?
thanks, sorry by my babelfish english :-)
_______________________________________________________ Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora! http://br.mobile.yahoo.com/mailalertas/
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________________ Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora! http://br.mobile.yahoo.com/mailalertas/
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________________ Você quer respostas para suas perguntas? Ou você sabe muito e quer compartilhar seu conhecimento? Experimente o Yahoo! Respostas ! http://br.answers.yahoo.com/
The manual is badly outdated. I am in the process of a major revision. Maybe we can start a page on the wiki of things to revise in the manual for the next release. If anyone wants to help I would greatly appreciate it. --art On 21-Oct-06, at 6:24 AM, Hilquias.Abreu wrote:
wow, really cool. but i can't find method openKeyboard in HidIn. Also, no one reference of openKeyboard() in manual.
thaks for the patience.
Spencer Salazar escreveu:
Yes, it should be possible with HidIn and HidIn.openKeyboard(), but probably not KBHit.
Keyboard input through HidIn tells you when a key is pressed and then when it is released. So you could have a loop that waits for "f1" or "enter" to be pressed. When one of these keys is pressed, it would continue to another loop, which would wait until either the first key was released, or the next key is pressed. You could probably generalize this for arbitrary combinations of two keys if you wanted.
Note that HidIn doesn't return ASCII values, but rather platform- dependent keycodes, so you have to test with examples/hid/kb.ck to find out what f1 and enter are exactly. Also, HidIn won't work with keyboards under Linux until the next ChucK release.
spencer
On Oct 19, 2006, at 11:30 AM, Hilquias.Abreu wrote:
ok, but can chuck get combinations like "enter+f1"? the return is ascii of "f1" or "enter". exist a workarround for this?
Tasmo escreveu:
Do you mean, how to get the kea codes? Just start the examples/hid/kb.ck and watch your Console Monitor...
Does it help? T
2006/10/17, Hilquias.Abreu
: how to catch strange combinations of hotkeys, like f1+enter?
thanks, sorry by my babelfish english :-)
_______________________________________________________ Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora! http://br.mobile.yahoo.com/mailalertas/
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________________ Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora! http://br.mobile.yahoo.com/mailalertas/
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________________ Você quer respostas para suas perguntas? Ou você sabe muito e quer compartilhar seu conhecimento? Experimente o Yahoo! Respostas ! http://br.answers.yahoo.com/ _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
Its true, with respect to HidIn, the manual is out of date. (I recently updated the HidIn documentation in CVS, but I haven't uploaded that to the webpage yet... maybe ill do that later today.) Hilquias, I would recommend looking at examples/hid/keyboard-organ.ck and examples/hid/kb.ck, which are two examples that come with the standard chuck distribution. That's probably your best option for figuring out how to use HID keyboard input. spencer On Oct 21, 2006, at 12:12 PM, Adam Tindale wrote:
The manual is badly outdated. I am in the process of a major revision. Maybe we can start a page on the wiki of things to revise in the manual for the next release. If anyone wants to help I would greatly appreciate it.
--art
On 21-Oct-06, at 6:24 AM, Hilquias.Abreu wrote:
wow, really cool. but i can't find method openKeyboard in HidIn. Also, no one reference of openKeyboard() in manual.
thaks for the patience.
Spencer Salazar escreveu:
Yes, it should be possible with HidIn and HidIn.openKeyboard(), but probably not KBHit.
Keyboard input through HidIn tells you when a key is pressed and then when it is released. So you could have a loop that waits for "f1" or "enter" to be pressed. When one of these keys is pressed, it would continue to another loop, which would wait until either the first key was released, or the next key is pressed. You could probably generalize this for arbitrary combinations of two keys if you wanted.
Note that HidIn doesn't return ASCII values, but rather platform- dependent keycodes, so you have to test with examples/hid/kb.ck to find out what f1 and enter are exactly. Also, HidIn won't work with keyboards under Linux until the next ChucK release.
spencer
On Oct 19, 2006, at 11:30 AM, Hilquias.Abreu wrote:
ok, but can chuck get combinations like "enter+f1"? the return is ascii of "f1" or "enter". exist a workarround for this?
Tasmo escreveu:
Do you mean, how to get the kea codes? Just start the examples/hid/kb.ck and watch your Console Monitor...
Does it help? T
2006/10/17, Hilquias.Abreu
: how to catch strange combinations of hotkeys, like f1+enter?
thanks, sorry by my babelfish english :-)
_______________________________________________________ Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora! http://br.mobile.yahoo.com/mailalertas/
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________________ Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora! http://br.mobile.yahoo.com/mailalertas/
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________________ Você quer respostas para suas perguntas? Ou você sabe muito e quer compartilhar seu conhecimento? Experimente o Yahoo! Respostas ! http://br.answers.yahoo.com/ _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
participants (6)
-
Adam Tindale
-
Hilquias.Abreu
-
Jerry
-
Kassen
-
Spencer Salazar
-
Tasmo