Re: [AD] Keyconf problem?

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Elias Pschernig wrote:

Ok, just looked at it again, and simply replacing ToAscii with
ToUnicode solves the unicode problem. Patch updated. So I'd say, if
testing doesn't reveal additional problems, the patch would be ok for
4.2.0. In that case, I'll also add scancode_to_name and mark all
mentions of keyboard.dat/keyconf.exe in and so on in the docs as
DOS-only.

The problems that remain:
- no dead keys
- user/OS repeat settings are ignored

Both of which probably can't be solved with a DirectInput driver - so
the solution would be to write a driver who can utilize the WM_CHAR
messages or something like that.


In case you didn't see it, I emulated the OS repeat settings in the new_api_branch.

+      /* Nice, seems Windows has a function to just get the unicode character. */
+      n = ToUnicode(vkey, scancode, keystate, chars, sizeof chars, 0);
+      if (n)
This should probably be "if (n==1)"; see below.

+      {
+         /* Additional characters are dropped, since I'm not sure when exactly this occurs. */
+	 unicode = chars[0];
+      }
+      else
+         unicode = 0;
+   }



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/