Re: Keymap v2
sueastside <[email protected]>
| Newsgroups | gmane.comp.graphics.crystalspace.devel |
|---|---|
| Message-ID | <[email protected]> |
People tend to roll their own it seems, although CS has one for simple actions http://www.crystalspace3d.org/docs/online/api-2.0/classcsInputBinder.html which allows to bind keys to ids that correspond to actions. Another option would be transforming key events to action events in some configurable way, which is what the following code does: https://cyanox.nl/peragro/trunk/src/client/input/ On 06/10/2012 09:28 AM, Dominik Seifert wrote: > Hi, > > I was wondering why CS has no Keymap class? It seems like a very basic > feature. > > Basically it can be a simple map (or other kind of associative array) > that connects key descriptors (key pressed + modifiers) to a KeyEvent > which is a class with a functor, name, description, or simply functor > and command (like a console command), so that key events can also be > easily triggered via command, to allow for simpler client scripts etc. > > Or does that already exist? > > -Domi > > PS: I think I just discovered the key shortcut for "Send Now and Don't > Ask any Questions!" - Which is why the previous version of this email > was sent before I finished. > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > > _______________________________________________ > Crystal-develop mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/crystal-develop ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Crystal-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/crystal-develop