cancel
Showing results for 
Search instead for 
Did you mean: 

An Event needs to be triggered at any key press

Former Member
0 Kudos

Hi,

I have a requirement of triggering an event on any keyboard key press on a perticular view.

Can you please guide me, how can this be done?

Regards,

Rohit Dhinakaran

Accepted Solutions (0)

Answers (2)

Answers (2)

amy_king
Active Contributor
0 Kudos

Hi Rohit,

UI elements have only specific events for certain key presses. For example, InputFields have an event onEnter for when the ENTER key is pressed. But not every UI element and not every keyboard key has a corresponding event that can be triggered.

The hook method WDDOMODIFYVIEW may work for you. This method executes on return from events such as action handlers and search helps. I use this method when I need to perform certain steps that can't be performed in action handlers. There is also WDDOAFTERACTION which executes after every action.

Can you give more information about why you need to capture every keypress?

Cheers,

Amy

Former Member
0 Kudos

Hi Rohit,

You can create an eventhandler for this for a particular UI element. Like if you need any action to be performed on Pressing Enter key on an input field then write corresponding code in the event handler .

Please refer the below mentioned link :

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/45/12093591152464e10000000a1553f7/frameset.htm

Thanks,

Nsingh