ctrl-} mapping out of sync. w. menu

Bug #347059 reported by tbnorth
2
Affects Status Importance Assigned to Milestone
leo-editor
Fix Released
Medium
Unassigned

Bug Description

menu Outline - Move - Demote menu says ctrl-} and ctrl-{ demote and promote but those keys move text in the body even when the head is the active panel. Maybe ctrl-[ ctrl-] bindings are interfering.

Trunk at now, ubuntu 8.10, qt

Revision history for this message
Edward K. Ream (edreamleo) wrote : Re: [Bug 347059] [NEW] ctrl-} mapping out of sync. w. menu

On Sun, Mar 22, 2009 at 9:20 PM, tbnorth <email address hidden> wrote:

> Public bug reported:
>
> menu Outline - Move - Demote menu says ctrl-} and ctrl-{ demote and
> promote but those keys move text in the body even when the head is the
> active panel. Maybe ctrl-[ ctrl-] bindings are interfering.

I suppose this could be called a bug. Probably what is happening is that
bindings are general, and the code is specific: it always works on the
body. You could make the bindings specific to the body pane, but not much
would really change.

In short, this is a nit, and probably fixable in myLeoSettings.leo.

Edward

Revision history for this message
tbnorth (terry-n-brown) wrote :

On Mon, 23 Mar 2009 14:22:50 -0000
"Edward K. Ream" <email address hidden> wrote:

> > menu Outline - Move - Demote menu says ctrl-} and ctrl-{ demote and
> > promote but those keys move text in the body even when the head is
> > the active panel. Maybe ctrl-[ ctrl-] bindings are interfering.
>
> I suppose this could be called a bug. Probably what is happening is
> that bindings are general, and the code is specific: it always works
> on the body. You could make the bindings specific to the body pane,
> but not much would really change.
>
> In short, this is a nit, and probably fixable in myLeoSettings.leo.

In myLeoSettings.leo I have:

close-xml-element ! body = Ctrl-C
demote ! all = Ctrl-}
promote ! all = Ctrl-{
demote ! all = Ctrl-]
promote ! all = Ctrl-[
print-settings ! all = Ctrl-U

the print-settings binding I threw in to test seems to be working fine,
but I can't get any demotion. Also on startup I notice:

redefining shortcut Ctrl+bracketright from demote to indent-region in
all
redefining shortcut Ctrl+u from move-outline-up to print-settings in
all
redefining shortcut Ctrl+bracketleft from promote to
unindent-region in all

the Ctrl+u part makes sense, the others don't.

Revision history for this message
Edward K. Ream (edreamleo) wrote :

On Mon, Mar 23, 2009 at 9:50 AM, tbnorth <email address hidden> wrote:

>
> redefining shortcut Ctrl+bracketright from demote to indent-region in all
> redefining shortcut Ctrl+u from move-outline-up to print-settings in all
> redefining shortcut Ctrl+bracketleft from promote to
> unindent-region in all
>
> the Ctrl+u part makes sense, the others don't.

The qt plugin has to play some gruesome games with key bindings. Maybe more
games are needed.

How do these bindings work with the tk gui enabled?

Edward

Revision history for this message
tbnorth (terry-n-brown) wrote :

On Mon, 23 Mar 2009 15:37:26 -0000
"Edward K. Ream" <email address hidden> wrote:

> > redefining shortcut Ctrl+bracketright from demote to
> > indent-region in all redefining shortcut Ctrl+u from
> > move-outline-up to print-settings in all redefining shortcut
> > Ctrl+bracketleft from promote to unindent-region in all
> >
> > the Ctrl+u part makes sense, the others don't.
>
> The qt plugin has to play some gruesome games with key bindings.
> Maybe more games are needed.
>
> How do these bindings work with the tk gui enabled?

Ctrl-{} work, Ctrl-[] don't, I'd expect both to work, but would be
happy with just Ctrl-{} working in qt.

Also I tried permutations with and without Shift, i.e.

Ctrl-Shift-[ as well as Ctrl-{ etc.

Revision history for this message
Edward K. Ream (edreamleo) wrote :

On Mon, Mar 23, 2009 at 11:01 AM, tbnorth <email address hidden> wrote:

>
> > How do these bindings work with the tk gui enabled?
>
> Ctrl-{} work, Ctrl-[] don't, I'd expect both to work, but would be
> happy with just Ctrl-{} working in qt.
>
> Also I tried permutations with and without Shift, i.e.
>
> Ctrl-Shift-[ as well as Ctrl-{ etc.

So you are saying that the bindings work the same regardless of gui?

Edward

Revision history for this message
tbnorth (terry-n-brown) wrote :

On Mon, 23 Mar 2009 16:50:11 -0000
"Edward K. Ream" <email address hidden> wrote:

> On Mon, Mar 23, 2009 at 11:01 AM, tbnorth <email address hidden>
> wrote:
>
> >
> > > How do these bindings work with the tk gui enabled?
> >
> > Ctrl-{} work, Ctrl-[] don't, I'd expect both to work, but would be
> > happy with just Ctrl-{} working in qt.
> >
> > Also I tried permutations with and without Shift, i.e.
> >
> > Ctrl-Shift-[ as well as Ctrl-{ etc.
>
> So you are saying that the bindings work the same regardless of gui?

Nope, Ctrl-{} work in tk, not qt, in qt text indent / outdent seem to
take over everything. And it seems if tab/shift-tab are defaults for
that there's no need for any bindings of Ctrl-{}[] for that.

Revision history for this message
Ville M. Vainio (villemvainio) wrote :

On Mon, Mar 23, 2009 at 4:50 PM, tbnorth <email address hidden> wrote:

> close-xml-element ! body = Ctrl-C
> demote ! all = Ctrl-}

Just a thought: bindings like ctrl + } are extremely ambigous on
international keyboards, because you have press shift to reach that
anyway, to the extent that they are meaningless. ctrl+shift+ ] is the
same as ctrl + }. Generally, they should be avoided as much as
possible...

--
Ville M. Vainio
http://tinyurl.com/vainio

Revision history for this message
Edward K. Ream (edreamleo) wrote :

On Mon, Mar 23, 2009 at 12:28 PM, Ville M. Vainio <email address hidden>wrote:

> On Mon, Mar 23, 2009 at 4:50 PM, tbnorth <email address hidden>
> wrote:
>
> > close-xml-element ! body = Ctrl-C
> > demote ! all = Ctrl-}
>
> Just a thought: bindings like ctrl + } are extremely ambiguous on
> international keyboards, because you have press shift to reach that
> anyway, to the extent that they are meaningless. ctrl+shift+ ] is the
> same as ctrl + }. Generally, they should be avoided as much as
> possible...

I suspect that difficulties with this translation may be the problem with
the qt plugin.

Edward

Revision history for this message
Edward K. Ream (edreamleo) wrote :

On Mon, Mar 23, 2009 at 1:41 PM, Edward K. Ream <email address hidden> wrote:

>
>
> On Mon, Mar 23, 2009 at 12:28 PM, Ville M. Vainio <email address hidden>wrote:
>
>> On Mon, Mar 23, 2009 at 4:50 PM, tbnorth <email address hidden>
>> wrote:
>>
>> > close-xml-element ! body = Ctrl-C
>> > demote ! all = Ctrl-}
>>
>> Just a thought: bindings like ctrl + } are extremely ambiguous on
>> international keyboards, because you have press shift to reach that
>> anyway, to the extent that they are meaningless. ctrl+shift+ ] is the
>> same as ctrl + }. Generally, they should be avoided as much as
>> possible...
>>
>
> I suspect that difficulties with this translation may be the problem with
> the qt plugin.
>

Not sure this will be fixed before b1, but it definitely will be fixed
before Leo 4.6 final.

EKR

Changed in leo-editor:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Edward K. Ream (edreamleo) wrote :

On Mon, Mar 23, 2009 at 9:50 AM, tbnorth <email address hidden> wrote:

>
> In myLeoSettings.leo I have:
>
> close-xml-element ! body = Ctrl-C
> demote ! all = Ctrl-}
> promote ! all = Ctrl-{
> demote ! all = Ctrl-]
> promote ! all = Ctrl-[
> print-settings ! all = Ctrl-U
>
> the print-settings binding I threw in to test seems to be working fine,
> but I can't get any demotion. Also on startup I notice:
>
> redefining shortcut Ctrl+bracketright from demote to indent-region in
> all
> redefining shortcut Ctrl+u from move-outline-up to print-settings in
> all
> redefining shortcut Ctrl+bracketleft from promote to
> unindent-region in all

Rev 1708 of the trunk contains some key-handling tweaks. I'm not sure
whether they will help in your case, and your keyboard.

Edward

Revision history for this message
tbnorth (terry-n-brown) wrote :

On Tue, 07 Apr 2009 15:01:39 -0000
"Edward K. Ream" <email address hidden> wrote:

> Rev 1708 of the trunk contains some key-handling tweaks. I'm not sure
> whether they will help in your case, and your keyboard.

Running leo like this:

HOME=/tmp python launchLeo.py --gui=qt somefile.leo

Ctrl-] and Ctrl-[ still indent/outdent text in the body, even when I
specifically click in the tree to make sure it's active.

Seems to me they must be being bound to indent/outdent text in the body
deliberately - so is the issue identifying keycodes for Ctrl-] and
Ctrl-[, or applying the right key codes based on which pane is active?

If tab and shift-tab indent/outdent text in the body when there's an
active selection, is there a need for Ctrl-] and Ctrl-[ bindings for
indent/outdent? There not exactly the same, as the tab bindings
require an active selection.

Revision history for this message
Ville M. Vainio (villemvainio) wrote :

QQQ

If tab and shift-tab indent/outdent text in the body when there's an
active selection, is there a need for Ctrl-] and Ctrl-[ bindings for
indent/outdent? There not exactly the same, as the tab bindings
require an active selection.

QQQ

+1 for removing ctrl+] and ctrl + [ bindings. ctrl + { and ctrl + } bindings (pro/demote) work ok for me, but indent/unindent "special" bindings don't need to be around when we have tab / untab.

Revision history for this message
Edward K. Ream (edreamleo) wrote : Re: [Bug 347059] Re: ctrl-} mapping out of sync. w. menu

On Thu, May 14, 2009 at 2:46 PM, Ville M. Vainio <email address hidden> wrote:

> QQQ
>
> If tab and shift-tab indent/outdent text in the body when there's an
> active selection, is there a need for Ctrl-] and Ctrl-[ bindings for
> indent/outdent? There not exactly the same, as the tab bindings
> require an active selection.
>
> QQQ
>
> +1 for removing ctrl+] and ctrl + [ bindings. ctrl + { and ctrl + }
> bindings (pro/demote) work ok for me, but indent/unindent "special"
> bindings don't need to be around when we have tab / untab.

I agree that tab and shift-tab suffice. Feel free to remove these bindings
from leoSettings.leo if you like. Please run the check-bindings script
buttons after doing so.

Edward

Revision history for this message
Ville M. Vainio (villemvainio) wrote :

revno: 1876
committer: Ville M. Vainio <email address hidden>
branch nick: leo-editor
timestamp: Tue 2009-05-19 20:40:02 +0300
message:
  remove indet / unindent region shortcuts from ctrl + [. Now both ctrl +[ { } ] do promote / demote
  (this is required to have the shortcut functional in international keyboards)

Changed in leo-editor:
status: Confirmed → Fix Released
Revision history for this message
tbnorth (terry-n-brown) wrote :

On Tue, 19 May 2009 17:44:07 -0000
"Ville M. Vainio" <email address hidden> wrote:

> Subject: [Bug 347059] Re: ctrl-} mapping out of sync. w. menu

> ** Changed in: leo-editor
> Status: Confirmed => Fix Released

Woohoo - thanks for that, nice to have it working again.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.