1. mike S
  2. PowerBuilder
  3. Monday, 22 May 2023 13:44 PM UTC

anyone have any clever solutions for capturing a key when the alt key is pressed?  Looking to grab up/down arrow when the alt key is pressed, but the keydown event does not fire.

Accepted Answer
Mark Goldsmith Accepted Answer Pending Moderation
  1. Monday, 22 May 2023 15:40 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Mike...haven't tried this so I can't provide any input on whether it would work for your use case but take a look at Andrew's reply to this posting: https://community.appeon.com/index.php/qna/q-a/how-can-i-catch-tab-key. The OP's question was around the tab key but the solution Andrew provided suggests that it would work for the Alt key as well.  

HTH...regards,

Mark

Comment
  1. mike S
  2. Monday, 22 May 2023 15:52 PM UTC
thanks, yes that does look like what would have to be done. and it has the code for handling the alt key press
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 22 May 2023 13:49 PM UTC
  2. PowerBuilder
  3. # 1

Hi Mike;

 On what object class are you looking to capture this activity on?

Regards... Chris 

Comment
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Monday, 22 May 2023 14:04 PM UTC
  2. PowerBuilder
  3. # 2

datawindow

Comment
  1. Chris Pollach @Appeon
  2. Monday, 22 May 2023 14:19 PM UTC
Are you assuming that the DC will always have focus when you're trying to capture the keystrokes!
  1. Helpful
  1. mike S
  2. Monday, 22 May 2023 15:05 PM UTC
yes. works fine when you press the up/arrow or down arrow key. press alt key at the same time and it does not fire.



it isn't really a PB bug, but a 'feature' in windows. Seems to be some weird work arounds available in c# apps. I need to know if the alt key is pressed with those in order to make the UI work the same in my custom dddw's as it does in 'real' dddws.





  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.