[Y-devel] GUI design docs

Maurice van der Pot griffon26 at kfk4ever.com
Wed Feb 25 17:58:04 GMT 2004


On Wed, Feb 25, 2004 at 05:35:26PM +0200, Mikko Rantalainen wrote:
> 
> One more thing to consider: current PCs have USB connectors and you 
> can attach, say, two keyboards and three mouses plus one tablet 
> device. Say, in addition, we have multiple displays and two users. 
> Wouldn't it be nice to be able to bind one mouse and one keyboard to 
> one user that could use one of the displays to surf the web while 
> the another user continued to work with another keyboard. I think it 
> could be implemented by having a focus per keyboard and pointer 
> would be used to change the focus for that keyboard only.

The only difference between this situation and simply running two 
instances of Y is that they share a desktop. Is this really something 
you would like to have?

> However, instead of requiring a keyboard, we should use virtual 
> input devices. A virtual input device might be "implemented" with 
> one keyboard, two mouses and one joystick. Logically that's a 
> keyboard that has all the buttons of keyboard plus all the buttons 
> of both two mice and all the buttons in the joystick. In addition to 
> that, that virtual device also contains 2 (or more!) axis for both 
> the mice and at least two axis for the joystick. And possibly one or 
> more axis integrated in the keyboard. There should be a method to 
> map some (one or more) of those axis to horizontal 2D pointer used 
> to move "mouse cursor" and so on. For the Y, this input device has 
> (say) total of 103+3+3+8 buttons and 3+3+4 axis. Some of the buttons 
> generate "mouse button events" and some don't. Similarly, some of 
> the axis generate "mouse cursor" movement and some don't. Each 
> virtual input device like this would have a single focus in Y.

I like the idea. 

Multiple virtual keyboard devices are probably not very useful. 
If you connect multiple physical keyboards to your computer, it is fine 
if events from either keyboard seem to be coming from one virtual 
keyboard as far as an application is concerned.
For mice it's different. You could connect 2 physical mice and configure
them to use the same virtual mouse. You would have 1 pointer controlled
by both mice. Alternatively you could have a separate virtual mouse
for each physical one. Of course determining focus would become more
difficult, but that's your choice.
I suppose you could also create a virtual device with 3 axis and a 
couple of buttons that would be useful in 3D environments. You could
configure your joystick and your racing wheel together to implement this
device.

Now that I think about it, the names of these virtual devices do 
not necessarily have to be similar to the devices that implement them.
If you have a virtual text input device, it could be implemented by
a keyboard just as well as by some speech recognition software.
There may be even better examples.

And what if a physical device can implement multiple virtual devices?
Gestures for controlling applications are more similar to key events than 
to movement events. Code could be written to monitor mouse movement for
gestures and generate a key press of a virtual keyboard when a gesture
is recognised. Make the key bindings configurable and suddenly all
applications support gestures.

Maurice.




More information about the Y-devel mailing list









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