Button shortcut key CB3 56.0.7?

General discussion about Custom Buttons, including feature requests.

Button shortcut key CB3 56.0.7?

Postby steve.marks59 » Mon Mar 05, 2018 2:08 pm

How can I assign a shortcut key to a button using
srazzano's CB3 56.0.7?
I don't see the option in any of the edit window's tabs.
steve.marks59
 
Posts: 455
Joined: Fri Dec 23, 2011 11:23 pm
Location: Claymont, Delaware

Re: Button shortcut key CB3 56.0.7?

Postby srazzano » Mon Mar 05, 2018 7:36 pm

Try something like this in the buttons you want the shortcut keys for and define the parameters (need restart after edits):

Code: Select all
window.addEventListener("keypress", function(e) {
  if (e.key.toLowerCase() == "l" && e.shiftKey && e.ctrlKey && e.altKey) {
    e.stopPropagation();
    e.preventDefault();
    document.getElementById(self.id).click();
  }
}, false);
srazzano
 
Posts: 1545
Joined: Sat Mar 31, 2012 6:42 pm
Location: Las Vegas, Nevada

Re: Button shortcut key CB3 56.0.7?

Postby steve.marks59 » Tue Mar 06, 2018 1:40 pm

THANKS Srazzano
What would the exact code be if I wanted to assign
SHIFT F9 as a button's shortcut key?
steve.marks59
 
Posts: 455
Joined: Fri Dec 23, 2011 11:23 pm
Location: Claymont, Delaware

Re: Button shortcut key CB3 56.0.7?

Postby srazzano » Wed Mar 07, 2018 12:35 am

Ctrl + F9
Code: Select all
window.addEventListener("keypress", function(e) {
  if (e.keyCode == 120 && e.ctrlKey) {
    e.stopPropagation();
    e.preventDefault();
    document.getElementById(self.id).click();
  }
}, false);
srazzano
 
Posts: 1545
Joined: Sat Mar 31, 2012 6:42 pm
Location: Las Vegas, Nevada

Re: Button shortcut key CB3 56.0.7?

Postby steve.marks59 » Wed Mar 07, 2018 6:33 pm

THANKS Srazzano.
Where could I find a list of keycodes for keyboard keys?
steve.marks59
 
Posts: 455
Joined: Fri Dec 23, 2011 11:23 pm
Location: Claymont, Delaware

Re: Button shortcut key CB3 56.0.7?

Postby srazzano » Wed Mar 07, 2018 10:00 pm

srazzano
 
Posts: 1545
Joined: Sat Mar 31, 2012 6:42 pm
Location: Las Vegas, Nevada

Re: Button shortcut key CB3 56.0.7?

Postby steve.marks59 » Sat Mar 10, 2018 1:19 am

THANKS again Srazzano,
I appreciate you taking the time to help and inform me.
You are a good guy Sonny!
steve.marks59
 
Posts: 455
Joined: Fri Dec 23, 2011 11:23 pm
Location: Claymont, Delaware


Return to General Discussion

cron