Re: Emulation of Alt+Numpad+Digits behavior

2004-08-05 Thread Jörg Henne
Robert Currey wrote:
I do think that this goal is achievable, because the Alt-Numpad
functionality is so limited: all it does is to generate the same symbols
without regard to any codepage, keyboard mapping etc. And that's what
makes it useful im some cases (see below). And exactly because the
functionality is not supposed to be flexible at all, I think that it
doesn't necessarily conflict with the X paradigm.
   

To play nice, this should only need xkb file interpretation changes
(changing the way the code works may get messy).
I'm not that hip on how XKB maintains "state", but for Alt-gr type combos it
is at least close.
 

Unfortunately it is not possible to implement this functionality solely 
based on xkb configuration. It would definitely need some modification 
of xkb and I'm hesitating to go the xkb route because of the expected 
"messieness" and the fact that the functionality does not fit very well 
with the concept of xkb. Xkb deals with a limited set of states (levels, 
groups) whereas  Alt-Numpad needs a large number of states (all possible 
three-digit combinations).

ummm ... the  "to be transparent" is true for windows, but obviously not for
unix or mac or ...
This really smells like an input method ...so your app that needs to play
with "readers for Smartcards or keyboard-wedge style barcode readers" would
need to support the input method.
 

The problem here is that it will not be possible to change those 
applications: one application are sessions running in a 
terminal-emulation for IBM mainframes which just expect the data to be 
scanned or read from the smartcard to be "typed" into existing input fields.

Joerg Henne
___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: [I18n] Re: Emulation of Alt+Numpad+Digits behavior

2004-08-04 Thread Jörg Henne
Markus Kuhn wrote:
If you do something in this area, please implement the ISO 14755 hex
input method, and not the old MS-Windows one. (Or implement both
together, if you really need MS-Windows compatibility here. They don't
interfere with each other, because the ISO 14755 technique uses
Ctrl-Shift to activate the hex-entry mode, while MS-Windows uses Alt.)
 

For reasons stated in my previous message I really need the 
DOS/MS-Windows method. However, if there is a viable solution for either 
of the methods, implementing at least the sections 5.1 and 5.2 (basic 
and keyboard symbol entry) from ISO 14755 should be fairly 
straight-forward. Therefore I'll consider implementing both of them, but 
first I need a viable solution anyway.

Joerg Henne
___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Emulation of Alt+Numpad+Digits behavior

2004-08-04 Thread Jörg Henne
Tim Roberts wrote:
Jörg Henne wrote:
That sounds really interesting. I've just read a few things about X 
and input methods. What irritates me about this solution is that it 
seems like it would need special support for each and every 
application. However, I'm looking for a solution which works with 
every or most of the existing applications.

Is this goal even achievable?  The Alt-NumPad thing works in MS-DOS 
and Windows because it's implemented in the BIOS, and because the 
keyboard character sets mappings are universal and strictly 
controlled.  Alt-0227 maps to "ã" because that's the way it is in the 
standard code page.

X, on the other hand, is not supposed to be defining policy.  Let's 
assume your solution was implemented.  What would you expect to happen 
when you do Alt-227?  What symbol would it be, and in what character 
set?  Is it the same with a German keyboard layout?
I do think that this goal is achievable, because the Alt-Numpad 
functionality is so limited: all it does is to generate the same symbols 
without regard to any codepage, keyboard mapping etc. And that's what 
makes it useful im some cases (see below). And exactly because the 
functionality is not supposed to be flexible at all, I think that it 
doesn't necessarily conflict with the X paradigm.

Yes, with the german (or any other) keyboard  Alt-0227 generates an "ã". 
But beware: Alt-227 (without the leading 0) is different. This is 
because MS added the four-digit mappings in Windows in order to maintain 
compatibility with the three-digit ones from DOS.

Can we say unconditionally that no X application currently uses 
Alt-Numpad combinations?

Or maybe I'm just scaring up issues where none exist.
I don't think that one can safely assume that no application ever uses 
Alt-Numpad combinations. However, if those applications exist, they are 
probably rather rare. So why do I want the Alt-Numpad feature anyway, 
you may ask. The reason is simple: some specialized devices like 
keyboards with integrated readers for Smartcards or keyboard-wedge style 
barcode readers transmit their data via this mechanism. And their reason 
to use it, is that it offers a channel which is guaranteed to be 
transparent. i.e. unencumbered by keyboard mappings etc.

Joerg Henne
___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Emulation of Alt+Numpad+Digits behavior

2004-08-04 Thread Jörg Henne
Paulo César Pereira de Andrade wrote:
Alan Coopersmith wrote:
  Hi,
  I am not sure either what would be the correct place for this code.
One possible place is keep some state code in
xc/programs/Xserver/hw/xfree86/common/xf86Events.c:xf86PostKbdEvent(),
maybe handle it in xkb code or as Alan said, a new input method.
I have considered xc/programs/Xserver/hw/xfree86/input/keyboard/kbd.c. 
The problem, however, with all low-level (i.e. server-side and close to 
the hardware) solutions is: since the events carry only the keycode 
instead of the keysym we need a way to "ship" the event so that 
XLookupKeysym will return the keysym we want. One could try to choose 
the keycode so that it will result in the correct symbol, but it is not 
even guaranteed that all "synthesizable" keysyms have a way of being 
generated by the traditional mapping code.

Joerg Henne
___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Emulation of Alt+Numpad+Digits behavior

2004-08-04 Thread Jörg Henne
Alan Coopersmith wrote:
I'm not familiar with all the details, but it sounds like this may be
easiest done by adding a new input method on the client side - I've
cc'ed the i18n list in the hopes someone there can confirm or deny my
suspicion.
That sounds really interesting. I've just read a few things about X and 
input methods. What irritates me about this solution is that it seems 
like it would need special support for each and every application. 
However, I'm looking for a solution which works with every or most of 
the existing applications.

Thanks
Joerg Henne
___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Emulation of Alt+Numpad+Digits behavior

2004-08-04 Thread Jörg Henne
Hi,
well, even after digging through lots of source code and documentation, 
I could really use some help. What I am trying to do is to emulate the 
MS-Windows behaviour which lets one enter arbitrary characters by using 
the Alt-Key while entering the character code on the numerical keypad.

What would have to happen in order to emulate this feature is pretty 
simple: after releasing the Alt-Key, two (down/up) extra events would 
have to be sent which carry the keysym for the character which has been 
entered. However, this is not possible because the events carry just the 
keycodes and not keysyms.

I currently see two solutions:
- To add some code to the keyboard driver which synthesizes the events 
using a keysym-to-keycode lookup. This poses some problems: what happens 
if no corresponding keycode exists for thei given keysym? And how does 
this go together with xkb processing?

- To extend Xlib so that the emulation happens on the client side. Of 
course this brings up even bigger problems: is there a central and 
reliable place to do this? XLookupKeysym and friends would have to keep 
some state and work together with some event dispatching magic. That 
doesn't really sound healthy.

Well, that's it for now. Any help would be very greatly appreciated.
Joerg Henne
___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Emulation of Alt+Numpad+Digits behavior

2004-07-28 Thread Jörg Henne
Hi,
(I seem to be out of luck on the XFree86 list, therefore I repost this 
message to devel)

is it possible with a stock XF86 to emulate the Windows/DOS behavior
where the combination of  Alt (held down) plus a combination of three
numpad digits is translated into a corresponding key code? For instance
pressing and holding Alt and typing "1, 2, 3" on the numpad generates a "{".
If this is not possible, where would I start looking, if I wanted to
implement this feature? I guess this whould go into xkb rather than the
keyboard/kbd driver, correct?
Thanks in advance
Joerg Henne
___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel