Re: [Fwd: Re: Changing keybindings and mouse bindings]

From: <msevior_at_physics.unimelb.edu.au>
Date: Fri Apr 13 2007 - 03:38:22 CEST

> Hi Martin,
>
> are you planning to implement that proposal soon? If possible I'd
> rather give it some time until we've got a better idea of the big
> picture, including language bindings (a C/gobject API is much easier
> to wrap). Maybe we wouldn't have to put it into abiword itself at all
> and rather write a small standalone library/utility that plugs into
> abiword? Maybe it could even be an optional abiword plugin?
>

Hi Rob,
       I'd like to implement it within the next month. Both OLPC Write and
Develop need different keybindings.

It could be written as a plugin and in fact I kind of like that idea. It
would make it possible to try it out without freezing an API too soon.

If we're happy with the plugin as a long term solution we can move it into
the main code base.

I'd like to have a long-term solution for 2.6 so that people can use
abiwidget and libabuword for their own wild and crazy needs.

Cheers

Martin

> Best,
> Rob
>
>
> On 4/10/07, msevior@physics.unimelb.edu.au
> <msevior@physics.unimelb.edu.au> wrote:
>>
>> ---------------------------- Original Message
>> ----------------------------
>> Subject: [Fwd: Re: Changing keybindings and mouse bindings]
>> From: msevior@physics.unimelb.edu.au
>> Date: Tue, April 10, 2007 19:00
>> To: "Robert Staudinger""" <robert.staudinger@gmail.com>
>> Cc: "Dominic Lachowicz" <domlachowicz@gmail.com>
>> msevior@physics.unimelb.edu.au
>> --------------------------------------------------------------------------
>>
>> HI Rob,
>> See below for my initial email.
>>
>> Here is my original idea for an ascii file format to be loaded in the
>> class
>> EV_EditBindingMap. See src/af/ev/xp/ev_EditBindingMap.(h,cpp)
>>
>> See below for how the API is setup in XAP_App for changing keybindings.
>> ------------------------------------------------------------------------
>>
>>
>> bool EV_EditBindingMap::parseEditBinding(void /*const char * szAscii*/)
>> {
>> /* TODO here we import a binding from a primitive ascii format
>> ** TODO or XML syntax.
>> */
>> /*
>> The Ascii format is close to the definition in
>> wp/ap/xp/ap_LB_Default.cpp
>> Lines beginning with "//" are comments
>>
>> Each CR seperated lines define a set of bindings for a single mouse
>> context or
>> key stroke. Entries are seperated by commas. In creating the context,
>> several
>> modifiers can be used. Control, Alt, Shift, Control-Alt (C, A, S )
>>
>> The first token of each line determines whether the defintion is for
>> mouse
>> context (mse), Named Virtual Key (nvk), or keystroke (key).
>>
>> The definition of each set of bindings are always in the following order
>> for
>> mouse contexts.
>>
>> Up to to 6 buttons are available for the mouse. (B0, B1, B2, B3, B4, B5,
>> B6)
>> The follow contexts are available:
>>
>> Short cut C++ enum
>> ========= =========
>> CU EV_EMC_UNKNOWN
>> CT EV_EMC_TEXT
>> CM EV_EMC_MISSPELLEDTEXT
>> CL EV_EMC_LEFTOFTEXT
>> CR EV_EMC_RIGHTOFTEXT
>> CI EV_EMC_IMAGE
>> CZ EV_EMC_IMAGESIZE
>> CF EV_EMC_FIELD
>> CH EV_EMC_HYPERLINK
>> CV EV_EMC_REVISION
>> CTV EV_EMC_VLINE
>> CTH EV_EMC_HLINE
>> CTF EV_EMC_FRAME
>> CVD EV_EMC_VISUALTEXTDRAG
>> CTC EV_EMC_TOPCELL
>> CTO EV_EMC_TOC
>> CPO EV_EMC_POSOBJECT
>> CMA EV_EMC_MATH
>> CEM EV_EMC_EMBED
>>
>> mse, Button, context, click, dblclick, drag, dbldrag, release, double
>> release
>>
>> The first 3 entries describe the combination of buttons and context, the
>> six entries that follow are the names of the EditMethods that called for
>> each invocation of the mouse button and context.
>>
>> So some examples are:
>>
>> mse, B0, CU , , , cursorDefault, , ,
>> mse, B0, CEM , , , btn0InlineImage , ,
>> mse, B1, CVD , cutVisualText, copyVisualText, dragVisualText,
>> dragVisualText, dragVisualText, pasteVisualText
>> mse, B1, CVD C
>> ,copyVisualText,cutVisualText,dragVisualText,dragVisualText,
>> pasteVisualText,pasteVisualText
>>
>> //
>> // mse/NVK/Key
>> // NVK, Key Name, No modifier, S, C, S C,A , A S, A C, A C S
>> //
>> NVK, EV_NVK_BACKSPACE, delLeft,delLeft,delBOW, , , , ,
>> //
>> // key, Key Value, No modifier, C, A, A C
>> //
>> key, 0x41, insertData, selectAll, ,
>> */
>>
>> return false;
>> }
>>
>>
>> -------------------------------------------------------------------
>>
>> cheers
>>
>> Martin
>>
>>
>> ---------------------------- Original Message
>> ----------------------------
>> Subject: Re: Changing keybindings and mouse bindings
>> From: "Dominic Lachowicz" <domlachowicz@gmail.com>
>> Date: Fri, April 6, 2007 12:34
>> To: "msevior@physics.unimelb.edu.au"
>> <msevior@physics.unimelb.edu.au>
>> Cc: abiword-dev@abisource.com
>> --------------------------------------------------------------------------
>>
>> 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 for 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 13 03:37:56 2007

This archive was generated by hypermail 2.1.8 : Fri Apr 13 2007 - 03:37:57 CEST