RB simply does not support non-US keyboards well enough. For me, it's
practically impossible now to write an app that can adjust to any
possible international keyboard if I want to use more than just the
letter keys.

E.g, I can't put a non-alpha shortcut into the menu and expect that
every international user can press that key combination (example:
Command-Shift-\, or on the PC: Ctrl-Shift-\). There are several things
missing, one of them we can't even solve with plugins:

1. We need to get access to the Scan Code that came along with a
pressed key's character (Asc) code. Sure, there is
Keyboard.AsyncKeyDown, but that's an _async_ function, meaning that at
the time we actually get to handle the KeyDown event, the user may
have already let go of that key again (can especially happen when
remote controlling a computer where keydown events gets pushed into
the system event queue without the keys actually ever being down on
that machine). I know that both Mac OS and Windows provide this
information, but it appears that RB just does not pass this up to us.
So, just like we can use Keyboard.Control (versus
Keyboard.AsyncControl), we need a Keyboard.ScanCode (versus
Keyboard.AsyncKeyDown) function that gets us the state from the
currently handled event in case it's a keydown(or even KeyUp)  event.

2. We need a function to convert a Scan code (including any possible
combinations of modifiers) into a character code (Asc code). I've once
written such a function for Mac OS, but we need something for Windows
and Linux as well.

3. A reverse function of (2) may be good as well, although that may be
difficult. After all, there are several ways to enter a "+": both the
main block and the numeric block offer such a key, and when it comes
to compound keys (á, ü, etc.) it's getting even more complicated.

The goal is that I can write code where I can find out what chacter
code both a shiftted and a unshifted press of a specific key gives me
so that I can (a) tell if they're different and then (b) put those
chars codes into me menu as shortcuts by code. There are other uses,
but this is an example where it's useful (no, don't tell me that I can
build separate apps for separate languages instead - that's totally
besides the point and does not meet what's necessary)

See also here:

<http://ramblings.aaronballman.com/?p=579>


So, has someone come up with solutions? Or is the AsyncKeyDown
actually giving the value from the event queue?

--
Thomas Tempelmann - exaggerating over a million times a day!
http://www.tempel.org/rb/  -- The primary source of outdated REALbasic
plugins and examples
Skype: tempel.org   AIM: superTempel
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to