Bug 7765

pbm_dwnkey event: keycode is only compliant with US keyboard settings 10 January, 2022

Miguel Leeuwe
09 January, 2022
Product: PowerBuilder Category: PowerScript
Version: 2021 Build: 1311
Classification: Publishing: Public
Priority: P3
Status: Reproducing Reason:
Communication Status: Waiting for Appeon
Miguel Leeuwe 10 January, 2022
To give some context of what I'm doing:
- When a dw column on a grid datawindow is "not editable", I allow the users to click on a column and from then on, when they type characters, I start searching and scrolling for any row that starts with the typed character string. I've put a delay in, to stop concatenating of the characters searched for. Something very similar to the behavior you get in the Windows File Explorer.

On a side-note, I've also noticed that, when a column is NOT enabled and you start typing, the "other" event is being launched, receiving the ascii value of the typed character in "wparam". This does not happen when you type into a field that IS enabled. I noticed this, because any time we would type an 'o', the other event would consider that as an OUTLOOK drop, so we had to work around this.
Miguel Leeuwe 09 January, 2022
gf_key2string_uk.srf (10KB)

I've added a function which shows the conversions that I have to do. I'm using this function to do a search "while typing" and scroll to any found row.
See attached.
Miguel Leeuwe 09 January, 2022
On my UK layout, certain keys just don't work right, like #, shift+#, /, etc.
The only key that I'm getting an "unknown keyvalue" for, is the one top-left: | and `. So therefore I cannot do anything with it.
This has to do with the fact that keyBackQuote! is triggered when pushing ' or @ and for # and ~, we get a keyQuote!
Miguel Leeuwe 09 January, 2022
If you look at the documentation, nothing is said about different keyboard layouts either:
Miguel Leeuwe 09 January, 2022
Enhancement request:
pbm_dwnkey event: keycode parameter received is incorrect for many 'special' characters when for example using a UK keyboard layout instead of US keyboard layout. They only seem to work correctly for a US keyboard.

Can this be fixed?


*Reproduce Steps:

Windows 10
Database Type:
Database Version: