Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function Module to retrieve keyboard key pressed

Former Member
0 Likes
1,181

Hello All,

I am looking for a function module / mechanism to know which keyboard key the user has pressed. I am looking to implement this in normal SAP GUI and not in Web Dynpro or similar.

Does such a function module exist / Is there a way to achieve this?

Thanks,

Mithun

5 REPLIES 5
Read only

Former Member
0 Likes
808

can you explain me how are you going to use it!!

if its a module pool program you can only use the keys which you get from Se41 list. keys like: the can trigger FCODES.

F2

F9

Shift-F2

Shift-F4

Shift-F5

==

Freely Assigned Function Keys

F5

F6

F7

F8

Shift-F1

Shift-F6

Shift-F7

Shift-F8

Shift-F9

Shift-Ctrl-0

Shift-F11

Shift-F12

Ctrl-F1

Ctrl-F2

Ctrl-F3

Ctrl-F4

Ctrl-F5

Ctrl-F6

Ctrl-F7

Ctrl-F8

Ctrl-F9

Ctrl-F10

and some more...

Read only

0 Likes
808

Hello,

I have a user exit (Function Module) which will be trigerred from the screen when the user clicks on a button.

Problem is that there is only one button to trigger the user exit. But I want more than one functionality.

Hence, my idea was to ask the user to click on a keyboard key and then click on the button which triggers the user exit.

In the user exit, I will check which keyboard key is pressed and based on that steer the functionality.

Hence, I wanted to know if this is possible.

Thanks,

Mithun

Read only

0 Likes
808

why dont you try a call screen inside the exit. give him a pop up kind of screen where he/she can select some values or enter .. and according to that you can do the processing

Read only

0 Likes
808

Hello,

Yes, that was my initial thought, but then I want a one click functionality (keyboard hits don't matter!)

Giving a pop up screen would be 2 clicks.

Hence, I wanted to go for this alternative.

Thanks,

Mithun

Read only

0 Likes
808

if you are going for a user exit then i am not sure if can capture any FCODE which is not defined for the screen, if its not defined you cannot capture..(unless you write some machine level code 😛 😛 just kidding).

so i think giving a pop up is a better option.. you can design this pop up screen to respond to key presses like ctrl+f2 etc.. that will be a key pres right not a click..