You need to sign in to do that
Don't have an account?
DJP1S
Create a Visualfroce keyboard shortcut?
I've got a method in my class that updates records. Some of my more savvy users would like a CTRL+S function to activate this while they're just sitting there.
Is there anyway to implement this? I don't see anything in the documentation.
The attribute you're looking for is "accesskey". That will let you assign a hot key (as per HTML standards). You can also use normal JavaScript; assign a body onKeyPress event handler that watches for a given keypress (e.g. Ctrl-S), and once detected, it can call an actionFunction defined in the form (or you can query for the commandButton by ID, and activate its onclick handler). I'd take a look at a normal course in JavaScript for help on that.
I tried something like this on my form and it won't work. Thanks for the Access key tip, though. I think users can adjust to using alt+s vs. ctrl + s. I'd still like to get ctrl + s working.