Re: Changing keybindings and mouse bindings

From: Dominic Lachowicz <domlachowicz_at_gmail.com>
Date: Fri Apr 06 2007 - 04:34:28 CEST

Hi Martin,

If Rob's SoC proposal is accepted, this is one of the things that I
hope we will focus on. We want to be able to handle alternate
keybindings, dialogs, and a lot of other stuff that makes sense for
the OLPC activity.

Cheers,
Dom

On 4/5/07, msevior@physics.unimelb.edu.au
<msevior@physics.unimelb.edu.au> wrote:
>
> Hi Folks,
> We're thinking up more and more uses for abiwidget. As we do it
> becomes clear that we need to able to change the key and mouse
> bindings for different uses of abiwidget. Write may need to change
> them for OLPC. Marc is developing an abiwidget based coding
> activity for OLPC. I'm think of making a simple presentation
> program with abiwidget.
>
> Our current mouse and keybindings are pretty close to optimal for a word
> processor but really need to be changed for these other tasks.
>
> As always the abi code base is flexible enough to make changing
> keybindings rather straight forward, we just need to work out a nice API
> to do it.
>
> The key and mouse bindings are defined in the class:
>
> EV_EditBindingMap
> {
> public:
> EV_EditBindingMap(EV_EditMethodContainer * pemc);
> ~EV_EditBindingMap();
>
> EV_EditBinding * findEditBinding(EV_EditBits eb);
> bool setBinding(EV_EditBits eb, const char * szMethodName);
> bool setBinding(EV_EditBits eb, EV_EditBinding * peb);
> bool removeBinding(EV_EditBits eb);
> bool parseEditBinding(void);
>
> const char * getShortcutFor(const EV_EditMethod * pEM) const;
>
> protected:
> EV_EditMethodContainer * m_pemc;
>
> ev_EB_MouseTable * m_pebMT[EV_COUNT_EMB];
> ev_EB_NVK_Table * m_pebNVK;
> ev_EB_Char_Table * m_pebChar;
> }
>
> located in the file src/af/ev/ev_EditBinding.cpp
>
> We access this via:
>
> EV_EditBindingMap * XAP_App::getBindingMap(const char * szName);
>
> Different keybinding maps can be created on the fly, given names and
> loadeded using..
>
> virtual UT_sint32 XAP_App::setInputMode(const char * szName);
> and the XAP_InputModes class
>
> in src/af/xap/xp/xap_InputModes.(h/cpp)
>
> I propose that we implement a new method:
>
> EV_EditBindingMap::createBindingMap(const char * szMapDescription)
>
> Where szMapDescription is an ascii represention of a mouse and key bindmap
> similar to src/wp/ap/xp/ap_LB_Default.cpp.
>
> With this method we can write new methods abiWidget.
>
> AbiWidget::createBindings(const char * szName, char * szDescription)
> AbiWidget::setBindings(const char * szName)
>
> Which create new key binding sets as needed and then implement then.
>
> This is exactly what I need for the simple presentation program where the
> bindings will change in slide show mode (full screen). I believe this will
> also be usefule for OLPC Write and Develop.
>
> Suggestions for implementations of the exact format of ascii
> representations plus comments and feedback on these ideas are welcomed!
>
> Cheers
>
> Martin
>
>
>
>
>
>

-- 
Counting bodies like sheep to the rhythm of the war drums.
Received on Fri Apr 6 04:33:20 2007

This archive was generated by hypermail 2.1.8 : Fri Apr 06 2007 - 04:33:21 CEST