Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: bobert3316 on September 27, 2012, 10:47:19 AM

Title: DOS/Windows style alt-codes
Post by: bobert3316 on September 27, 2012, 10:47:19 AM
I have an embedded system I'm trying to use with Tiny Core that has an unusual keyboard.  It sends many symbol keystrokes as alt codes.  For example, the open curly brace, "{", would be typed by pressing FUNC + A, and the keyboard would send ALT + 1 + 2 + 3 to the machine.  This works fine under Windows, and also works in the console on Tiny Core, but all X programs running under Xvesa and icewm ignore these keys. 

I've been trying to grasp the many different ways the keyboard can be configured under X, many of which apparently don't apply to Xvesa, and I haven't been able to make any progress.  I've tried installing Xorg and using xkb and a custom ~/.XCompose file, and I've tried kmaps with Xvesa, but can't tell if any of the included maps provide the desired functionality. 

Does Xvesa map the key events from Linux at all?  If so, where does this happen, and how can it be configured?  If not, any ideas on something that might be intercepting part of these key codes?  My preference would be to get it working with Xvesa and as little customization as possible  Thanks for any help you can provide.
Title: Re: DOS/Windows style alt-codes
Post by: curaga on September 27, 2012, 01:18:37 PM
X gets them as "alt, 1, 2, 3", not as "{". The translation happens later, in the toolkits.

So what codes are supported depend on the toolkit your app uses. The linux console seems to have a similar translation layer, but it's also at a higher level than the input stream.
Title: Re: DOS/Windows style alt-codes
Post by: bobert3316 on September 27, 2012, 03:17:23 PM
Xev shows exactly what you're describing.  Does this mean that there's no way to universally configure the keyboard translation?  Most important to me in this application is xterm and Opera browser, which I believe is built on Qt.  Can you point me towards which tools I would use to accomplish this, or is it just not possible with Xvesa?
Title: Re: DOS/Windows style alt-codes
Post by: Pseudoman on September 27, 2012, 04:34:41 PM
Probably not the best solution, but you could use the X Virtual Keyboard extension (xvkbd.tcz, I think) to input the keys that don't work. Quick band-aid solution until you get the real keyboard working.
Title: Re: DOS/Windows style alt-codes
Post by: tinypoodle on September 27, 2012, 07:46:34 PM
Opera browser, which I believe is built on Qt.

Only up til a certain 10.xx version, and since then based on X only.
Title: Re: DOS/Windows style alt-codes
Post by: curaga on September 28, 2012, 08:44:24 AM
I don't know if it's possible to do something better. Haven't heard of tools for it either.

Perhaps ask at the Xorg mailing list?