[Y-devel] about keyboard layouts

Alexey Boyko smartly at gala.net
Thu Feb 26 20:51:02 GMT 2004


Let keymapping file contains such structure (which loaded to memory at start):

For example, we have 2 button (K1, K2), and want to type with 5 characters 
(A,B,C,D,E)

      K1           K1
R -----------O-----------'A'
|            |     K2
|            +-----------'B'
|
|     K2           K1
+------------O-----------'C'
             |     K2          K1
             +-----------O----------- 'D'
                         |     K2
                         +----------- 'E'

(better viewed with fixed font)

Then key sequences will type all five characters:

  K1, K1 -> 'A'
  K1, K2 -> 'B'
  K2, K1 -> 'C'
  K2, K2, K1 -> 'D'
  K2, K2, K2 -> 'E'

Each key advances input state through a tree, and when it reach a leaf 
character event generated.

Each widget, which takes input, must store current tree position.

Driver can load several such layouts, and switch over them on key combination.

As I know, such keyboard layouts can cover simple and complex input languages.

Any comments?




More information about the Y-devel mailing list









2026 © www.Y-Windows.Org - All Rights Reserved