key commands in patches
While attempting to add keystroke control to every feature in my program project, I have run into some conflicts.
I have noticed that, in presentation mode, when a number, slider object, or bpatcher (with slider) is selected with the mouse, you can use the up and down arrow keys to change the numbers (or position of the slider/bpatcher). This is handy, but I would like to be able to use the keyboard to make the selection as well as the mouse. In other words, if I press "v" then the volume slider gets selected and I can then use the arrows to adjust it.
***I have a complicated way to do this that works, but it sometimes conflicts with the built-in function. i.e. if something is "selected" with the mouse and something is selected with the keyboard, they both move.
In another situation, I have a bpatcher with the horizontal slider activated making it a sliding window of buttons. I would like to disable the arrow key function without having to lose the slider function altogether.
Have you tried using the "select" message. This will enable you to type directly into number boxes using the numeric or arrow keys. You could also use the tab output to trigger selecting the next ui object. In the first example use the 1/2/3 key on your keyboard to select an initial object and then tab between them. The second example shows how you can use the tab button to remove focus from an object using a scripting hack.
----------begin_max5_patcher---------- 891.3oc0XksbaBCE8Y7WgFxqtc3Jwlaeo8Gnyzm6joCKJNzhAOfbVZl7uWs. IPRLaVlPdQXIKjNmiN2qj3gUFlg42QKMQeA8KjgwCqLLjMIZvnptg4tf6hRC JkcyL6vtPZg4Z0esOfEccR11eWPiXpggX4+Yq0HrqnzwR9adI5xpWgO.IYoT lb3fpFuJOikEriJmhuWjDjZ9b2yOvp6OtpUUSr62SUSpYRFybMxLLHaq4SSk XTKS9mrO.liDUyIwxoIO7Oeh3QLEM93pUhh05RDvN1ejDAXJhP3AFKOqKQv2 QRenl9CQDZSU3XTsMGaRFh2jVQo2xe6Zxvn2I4fYL8JZQZ9s8yxMJt5p2k5i x+wr9BVSRR1QKKC1ReklTFUjrmghobDQEOp6QZRFMJ+PFqoI83JF.dhGtR6A AeLIC+9HYtZzEwPgnv9sPdDQoOdlxVHCglP5Bvx9LXmTRGWRPpjqnucSPgfe BG1ZTUuJoYwhF3+HUHeukyizwdS19OGqBDo+y1cQ47HN5z3ccRoTF5dypp3Q 0dVtalI+mv6MJkwtdBJCtodPt3GhgoEOQleUTbwOEkb+hpEzk5zy1x88FRpu LTFrUNLYDM3un7YXOqyxIebTjE67Q3jOX2Mlyos.agW59BXZIflrj.1K9PE. qyiTtMfepIR+QPVJcg32cHzXUDRmoiGYJYvVqmRRYVPI8JNdRQwYt1op1Dqx yLpfIMpOeBY62qxnt.B+zzN5zz.ck2cTQRZTO9K89dkChckQoS4vZjxgcOaC 85GiPi7mhDcUZNGhckl0CdO1WliqfIsyryY4vI.7Q5zIsRdHeO4EcdwmqSRS Q6sElx7CEQ0.P4qVidlnwzRVRV.KIOqQe3wmM6z0IwwzrlQH6Rh2myoSEFNx gpGJjDe8M9pQOfR7EcFEpD2xiGuqtqGdicckSFsv4.smJpdw7cjEV9c1mSTI 9jSCAUtyLprGDpl4UPmA.JxHW+HNdBaOT8wWUAAxZmrF5dFfqVVX6MzzYVAk 3F1CPo5ASQ4o4Ep9K2tpYAvWWA7SurlgO+tw8qoujjKHB.CJvRQykIAr0B90 spNjTnsCG6EStfL8jkk51+VOUSGfEFBXGg.BVMQaCnehf0YHXs2bXuetU7P1 xewB+A4TvdKW0eHgkj4MUgHvBehFhy.jfSbK4tfDuxiq9OvUCv4C -----------end_max5_patcher-----------
You can disable the mouse input of any UI object in the inspector…
it somehow makes sense that numbox listens to up, down,
and return (as well as to numbers) since max v. 3, but
it is sometimes a pita that you always have to take care
that no numberboxes may be selected when you want to use
an arrow key with something else.
thats not what you wanted to hear, but one possible
solution is to create custom numberboxes and a custom
multislider, which do not use the arrow keys by default,
and use those instead of the maxmsp ones.
Thanks guys, I think this gives me enough to finish the task of making my patch useable for the one handed musician.
Forums > MaxMSP