Using KeyBoard Code In PowerBuilder

The keybd_event API is a simple but handy API. You can do anything you can do with your keyboard using this function. Popup the windows menu, place the current window in clipboard etc. There are many keycodes you can use. Some keys work instantly for instance, the tab key. The shift key however has to be pressed and released because you always use the shift key in combination with another key. Here is the API declaration:

External Function Declaration 

To press a key, use:

 To release a key, use:


Here’s a list with all the existing keycodes which is derived from the winuser.h include file.

Good Luck!


About The Author

0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments