cancel
Showing results for 
Search instead for 
Did you mean: 

Shortcut/Function key to button

Former Member
0 Kudos

Hi,

Can we assign shortcut/function key to a button in custom/standard components? for e.g. ctrl+s for saving ?

Regards,

Kamesh Bathla

Edited by: Kamesh Bathla on Apr 29, 2010 3:26 PM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Kamesh,

How are you doing?

I never tried this but I think you can achieve this using Java Script.


shortcut.add("Ctrl+S",function() {	
      document.getElementById(" YOUR button ID").onclick();    "I think this will call  event handler 

});
 

more info on subscribing to Key strokes--

http://www.openjs.com/scripts/events/keyboard_shortcuts/

SAP should come up assigning short cut keys in

 UI configuration - Field properties

based on

field type (for push button, links etc)

.

Cheers

--Ranga

Former Member
0 Kudos

Hello,

while your request sounds valid and reasonable, I think it would not be a good idea to enable hotkeys in the standard SAP UI Configuration Tool.

Many function and hotkeys (like e.g. F1 to F12) have special meanings and are already used by your operating system or your browser. There are far too many combinations of operating system/browser/local settings that would cause issues in customer systems.

Howver on a project basis it might be possible to use one of the Javascript libraries (like http://code.google.com/p/snippets-4-all/) to enable hotkeys for your solution.

Best regards,

Christian

former_member189678
Active Contributor
0 Kudos

Very good suggestion. I think SAP should partner with Microsoft for this.

Rg,

Harshit