booch 9 Posted January 1 Share Posted January 1 Just wanted to share a quick tip for others that may be new to C4 like me. I was surprised there wasn't a native ability to attach commands to multiple button combinations (or any input really); therefore, I wanted to share my solution: variables. For example, I programmed a quick press of 'down then up' on my (Control4 keypad's) volume buttons to turn rooms off. I'd initially tried double/triple press, but that overlapped with normal behavior. Example below -- enjoy! (And kudos to whoever has the best combo already going. Contemplating where/how to use the Konami code myself, ha.) Crustyloafer 1 Quote Link to post Share on other sites
TundraSonic 7 Posted January 1 Share Posted January 1 Good stuff! Yeah, I've been frustrated by the lack of some built-in stuff, especially long presses and dual presses. Dual press would seem ideal for your application. Quote Link to post Share on other sites
lippavisual 432 Posted January 2 Share Posted January 2 I don’t see the logic in doing this. What are you trying to do and why? HRT 1 Quote Link to post Share on other sites
booch 9 Posted January 2 Author Share Posted January 2 On 1/1/2021 at 9:35 AM, TundraSonic said: Good stuff! Yeah, I've been frustrated by the lack of some built-in stuff, especially long presses and dual presses. Dual press would seem ideal for your application. Thanks! Good point on dual press -- I think I'm going to try that next/instead. Unless there's some limitation on simultaneous commands, I could just switch the variable to only be active on press/deactivate on release and that should do it. It'd also seem possible to do long press by setting a delay/timer within the variable, but that may be clunky in real life. Quote Link to post Share on other sites
booch 9 Posted January 2 Author Share Posted January 2 22 hours ago, lippavisual said: I don’t see the logic in doing this. What are you trying to do and why? I want a way to turn off (media in) rooms from a six button keypad that isn't easily accidentally triggered or intermingled with other commands (or even illogical labels). For example, if I made it a triple press of the 'down' button, I could inadvertently trigger it through normal behavior. My lighting buttons use connections, so there'd be no way to separate it from those commands. Having this combo action solves that (and is a fairly common UI element IMO). Quote Link to post Share on other sites
booch 9 Posted January 3 Author Share Posted January 3 1 hour ago, booch said: Thanks! Good point on dual press -- I think I'm going to try that next/instead. Unless there's some limitation on simultaneous commands, I could just switch the variable to only be active on press/deactivate on release and that should do it. It'd also seem possible to do long press by setting a delay/timer within the variable, but that may be clunky in real life. Circling back to confirm this worked. I actually implemented press-and-hold as well. So now: Press either volume button once = pulse volume Press either and keep holding = continue pulsing volume every 250ms (could also be used for long press) Press both simultaneously = turn room off Quote Link to post Share on other sites
C4 User 57 Posted January 3 Share Posted January 3 I assume you realize you can program off of a single tap, double tap and triple tap of any button? But the trick is, when using the single, double and/or triple taps, you do not want to have any bindings on that button and you should not program against the “press” command. Quote Link to post Share on other sites
South Africa C4 user 756 Posted January 3 Share Posted January 3 Domosapiens also have a driver (Keypad Enhancer) which adds a lot of cool features like this to one’s keypads (available on Driver Central). TundraSonic 1 Quote Link to post Share on other sites
TundraSonic 7 Posted January 12 Share Posted January 12 @South Africa C4 user, thanks for the tip on the Keypad Enhancer. Have you used it much? Works well? Quote Link to post Share on other sites
msgreenf 2,376 Posted January 12 Share Posted January 12 its $90 Quote Link to post Share on other sites
South Africa C4 user 756 Posted January 13 Share Posted January 13 21 hours ago, TundraSonic said: @South Africa C4 user, thanks for the tip on the Keypad Enhancer. Have you used it much? Works well? Definitely a worthwhile, well supported driver Quote Link to post Share on other sites
booch 9 Posted January 15 Author Share Posted January 15 On 1/3/2021 at 6:57 AM, C4 User said: I assume you realize you can program off of a single tap, double tap and triple tap of any button? But the trick is, when using the single, double and/or triple taps, you do not want to have any bindings on that button and you should not program against the “press” command. Thanks. I do get this. I was referring to gaining the other UI combos/controls we've become accustomed to with our phones and rich web. My wife is loving the 'double volume off,' for example. Sorry if this seems nitpicky/dense, btw. I'm a product exec., so passion over this stuff is my job, ha. Quote Link to post Share on other sites
Cyknight 2,720 Posted January 15 Share Posted January 15 Volume would be: WHEN button up is pressed Start volume up command to room x WHEN button up is released Stop volume up to room x This accomplished a direct tap AND hold function with more accuracy. Can still program on both buttons: WHEN button up is pressed, IF button down is pressed turn off room and reverse for the other button so that pressing on or the other first doesn't matter. South Africa C4 user 1 Quote Link to post Share on other sites
booch 9 Posted January 15 Author Share Posted January 15 Makes sense, but how do you do a volume up 'start'? Wanted to do a loop, but this was all I could do in HE (below). Works great, but would love to clean up the code for pride sake! Quote Link to post Share on other sites
Cyknight 2,720 Posted January 15 Share Posted January 15 You're overthinking it All of that can go - there is the option any command to the room to instead of pulse to start (and stop) Quote Link to post Share on other sites
Cyknight 2,720 Posted January 15 Share Posted January 15 To do a combination tap and press and hold on those buttons is literally one line of code under 'press' and 'release' per button. 'Course dealer could also bind the button instead but that is not possible in HE Quote Link to post Share on other sites
Cyknight 2,720 Posted January 15 Share Posted January 15 Same for the power off - if you really want that on a press both, you'd still literally go WHEN button UP is pressed IF button DOWN is pressed turn of room Do the same on the DOWN button, and regardless which of the two was pressed first it'll shut off the room. No need for variables, else statements and so on and so forth. Quote Link to post Share on other sites
Cyknight 2,720 Posted January 15 Share Posted January 15 And yes, do both lines of programming under 'pressed' and it'll work (doesn't matter if it sends volume commands as well, the room is off anyway) Quote Link to post Share on other sites
booch 9 Posted January 16 Author Share Posted January 16 9 hours ago, Cyknight said: And yes, do both lines of programming under 'pressed' and it'll work (doesn't matter if it sends volume commands as well, the room is off anyway) These are great tips -- thank you! Quote Link to post Share on other sites
booch 9 Posted January 16 Author Share Posted January 16 13 hours ago, Cyknight said: Same for the power off - if you really want that on a press both, you'd still literally go WHEN button UP is pressed IF button DOWN is pressed turn of room Do the same on the DOWN button, and regardless which of the two was pressed first it'll shut off the room. No need for variables, else statements and so on and so forth. Wow -- just updated my stuff -- you weren't kidding with the 'overthinking'! Thanks again. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.