[Y-devel] GUI design docs

Ben Urban benurban at comcast.net
Thu Feb 26 08:19:06 GMT 2004


That reminds me of a library for Mac OS 9 called InputSprockets,
designed primarily for games.  Basically it allowed the program to bind
actions to various inputs from various devices.

What I'd like is for input and output devices to be completely
abstract.  For example, to see an N64 controller (best example I have
handy) as a device with 10 buttons, 2 axes, and an 8-way digital control
pad.  If output devices were treated like that too, it could be set up
so that (for example) two people could play a game where neither one can
see the other person's screen.  That would be an improvement over most
console gaming systems! :)

This would have to be at a very low level, of course.  Probably right
between the driver and UI levels.

I would be willing to work on such a task.  In case anyone needs
clarification, I'll write up some preliminary header files and post them
to the list.

On Wed, 2004-02-25 at 10:35, Mikko Rantalainen wrote:
> [Flying high... just try to follow my line of thought.]
> 
> [snip]
> 
> 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.
> 
> 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 think a virtual device should be able to output at least raw 
> button events for every button, cursor movement for at least three 
> dimensions, ideally for unlimited dimensions (user can map every 
> axis to different dimension of every axis to the same dimension, and 
> we don't know how many axis the virtual device might have) and 
> character output for whatever character input method the user might 
> be using. (I don't have a clue how, for example, Chinese could be 
> written with a keyboard and how that looks to the OS/GUI.)
> 
> In short, Y should have some kind of support for more than two axis. 
> I'd expect that in the future we'll have trackball on top of our 
> mouse where we normally have a mouse wheel. Y should be able to map 
> the trackball movement to window scrolling or for modifying Z-axis 
> in 3d world and zooming with the another axis. Also, precision of 
> more than a single pixel should be supported.
> 
> I'm not saying that Y must implement code for such features but that 
> the APIs that we decide must be generic enough to not remove 
> possibilities for future extensions.
> 
> And for heavens sake, don't make artificial limitations between 
> mapping mouse actions as they were keyboard actions and wise versa. 
> If your mouse has only two buttons but some application needs four, 
> you should be able to use F11 and F12 for the missing mouse buttons 
> if that's what you want.
> 
> [snip]





More information about the Y-devel mailing list









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