swinput-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swinput-devel] Support of different keyboard layouts


From: Daniel Hiepler
Subject: [Swinput-devel] Support of different keyboard layouts
Date: Mon, 4 Feb 2008 16:09:02 +0100

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi,

I thought about how to overcome the problems that some output-strings
have to be simulated differently with different keymaps. (like the "@"
special-char). I think it would be best to stuck to the swkeybd
philosophy of "simulating keypresses" and maybe follow this idea
further by supporting press and release for EVERY key. So one can
simulate something like "press 'a' key, wait 2 seconds, press 'b' key,
wait 1 second, release both keys". Strings could then be added as
features. I thought of something like this similar to swmouse:

p a                         (presses a)
r a                         (releases a)
p a b c                     (presses a,b,and c
r [STRG] a b c 1 2 [SHIFT]  (release strg+shift+a+b+c+1+2)

then to have whole strings one could do:

s print this string\n       (will output "print this string)

s should also be the default behaviour so that 
"echo foo > /dev/swkeybd" will give the expected value.

so either a string is taken and sent to the keyboard or if the
statement starts with "p<space>", "r<space>" or "s<space>" the
coresponding command is executed...


a BNF grammar would be something like this (i guess):

statement     := (
                    (p|P <key>+( <key>*)) | 
                    (r|R <key>+( <key>)*)) |
                    (s <string>)
                 ) |
                 <string>

key           := [a-z]+ | <special_key>

special_key   := \[[A-Z]+\]

string        := "any string, maybe with printf-like escaped chars"

special_key should translate to a valid key stored in a lookup-table...


are there better sugestions? instead of only translating strings and
hiding the "press/release" function from the user, a lot flexibility is
lost.

what do you think?

regards
- -- 
rigid

I took a fish head to the movies and I didn't have to pay.
- -- Fish Heads, Saturday Night Live, 1977.

PGP Key available.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)

iD8DBQFHpyqOqIMZqVYEjtoRAqB2AJ9HMkMhcOYYK0PudJ4kU/ntQsxeLQCg04lM
ZS49aFB17p7R+6quRd9eQPc=
=RiwW
-----END PGP SIGNATURE-----

reply via email to

[Prev in Thread] Current Thread [Next in Thread]