WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: DOS/Windows style alt-codes  (Read 2386 times)

Offline bobert3316

  • Newbie
  • *
  • Posts: 11
DOS/Windows style alt-codes
« 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.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11022
Re: DOS/Windows style alt-codes
« Reply #1 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.
The only barriers that can stop you are the ones you create yourself.

Offline bobert3316

  • Newbie
  • *
  • Posts: 11
Re: DOS/Windows style alt-codes
« Reply #2 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?

Pseudoman

  • Guest
Re: DOS/Windows style alt-codes
« Reply #3 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.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: DOS/Windows style alt-codes
« Reply #4 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.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11022
Re: DOS/Windows style alt-codes
« Reply #5 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?
The only barriers that can stop you are the ones you create yourself.