After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 500193 - Adjust keybindings for reviewing previous messages
Adjust keybindings for reviewing previous messages
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: 2.22.0
Assigned To: Scott Haeger
Orca Maintainers
Depends on:
Blocks: 466251
 
 
Reported: 2007-11-28 13:30 UTC by Willie Walker
Modified: 2008-07-22 19:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
first patch for Move bookmarks keybindings to Fn keys (4.69 KB, patch)
2007-11-30 21:02 UTC, Scott Haeger
none Details | Review
second version of Move bookmarks keybindings to Fn keys (5.59 KB, patch)
2007-12-01 01:12 UTC, Scott Haeger
none Details | Review
third version of Move bookmarks keybindings to Fn keys (9.14 KB, patch)
2007-12-03 17:46 UTC, Scott Haeger
none Details | Review
Revised patch (9.49 KB, patch)
2007-12-03 19:05 UTC, Willie Walker
committed Details | Review

Description Willie Walker 2007-11-28 13:30:23 UTC
The Fn keys are valuable parallels to the numeric key.  We'd like to use them for other operations, such as bookmarks.  To make room for this we need to shuffle some other keybindings around:

1) Move the enter learn mode binding from Orca+F1 to Orca+h

2) Add Ctrl+Alt to the key bindings for debugging: Orca+F3 (report script info), Orca+F5 (list apps), Orca+F4 (toggle debug level), Orca+F6 (print active app), Orca+F7 (print ancestry), Orca+F8 (print hierarchy), Ctrl+Orca+F8 (print memory usage).  The print memory usage handler probably can just go unbound for now (i.e., remove the keybindings.add line for it).

3) Move the bookmarks keys from the # keys to the Fn keys

Mike - should we limit this change to just F1 thru F10?  If not, we will also need to move Orca+F11 (toggle read table cell/row) and we will also need to make sure we bind SunF36 and SunF37 as equivalents for F11 and F12.
Comment 1 Willie Walker 2007-11-28 13:36:59 UTC
In looking more at the code, this will also require modifications to gaim.py -- it currently overrides the "toGoBookmark" handler to be readPreviousMessage.
Comment 2 Rich Burridge 2007-11-28 15:31:11 UTC
> 2) Add Ctrl+Alt to the key bindings for debugging: Orca+F3 (report script
> info), Orca+F5 (list apps), Orca+F4 (toggle debug level), Orca+F6 (print active
> app), Orca+F7 (print ancestry), Orca+F8 (print hierarchy), Ctrl+Orca+F8 (print
> memory usage).  The print memory usage handler probably can just go unbound for
> now (i.e., remove the keybindings.add line for it).

If I'm understanding this correctly, print ancestry is now
Orca+Ctrl+Alt+F7? (Or did you mean it's now Ctrl+Alt+F7)?
If it's the latter, then ignore the next paragraph.

If it's the former, that's *really* hard to type. Any chance
we can just adjust the debug keys to Ctrl+Alt+Fn (the memory 
usage one would just be moved to an unused one like F9)?

Yes, I know I can always just override them in my own key
bindings, but it would be nice if all Orca developers didn't 
have to do this.

Thanks for considering...
Comment 3 Mike Pedersen 2007-11-28 16:01:52 UTC
 
> Mike - should we limit this change to just F1 thru F10?  If not, we will also
> need to move Orca+F11 (toggle read table cell/row) and we will also need to
> make sure we bind SunF36 and SunF37 as equivalents for F11 and F12.
>
In my opinion, 10 bookmarks per page is plenty.  I don't see any need to move f11 and f12.  

Comment 4 Mike Pedersen 2007-11-28 16:18:44 UTC
> Yes, I know I can always just override them in my own key
> bindings, but it would be nice if all Orca developers didn't 
> have to do this.
>
The concern I've always had with adding orca keys that don't use the orca modifier is:  What happens if some application such as openoffice that uses really odd key bindings decides to use the binding we chose.  If that happens, the user will quickly become confused because the application functionality they are trying to use won't work.  
 
Comment 5 Willie Walker 2007-11-28 16:21:47 UTC
> If I'm understanding this correctly, print ancestry is now
> Orca+Ctrl+Alt+F7? (Or did you mean it's now Ctrl+Alt+F7)?
> If it's the latter, then ignore the next paragraph.
> 
> If it's the former, that's *really* hard to type. Any chance
> we can just adjust the debug keys to Ctrl+Alt+Fn (the memory 
> usage one would just be moved to an unused one like F9)?

While I generally do not like contortionist keybindings, I think it is OK if the default debugging keybindings are not easy to use.  If we think the higher producing Orca developers will end up using them tens of times a day while developing Orca, however, we should try to come up with something better.

I really don't like Orca keybindings that don't use the Orca modifier -- these things have a higher chance of conflicting with keybindings used by other applications.  I think the main exceptions we have are keys web content navigation and the fact that we take over the keypad for flat review in desktop mode.  Mike is pretty strong in his opinion about not using the Orca modifier keys for these things since they are frequently used commands by end users, among other reasons.

Given this, can you suggest alternative debugging keybindings that use the Orca modifier?  They don't have to be Fn keys, but they should be keybindings unlikely to conflict with keybindings we may want for end user use.
Comment 6 Rich Burridge 2007-11-28 16:24:56 UTC
Can they just be changed to just Orca+Ctrl+F<n> or
Orca+Alt+F<n> rather then Orca+Ctrl+Alt+F<n> then?

It's still two-handed, but it's slightly easier to type.

Comment 7 Willie Walker 2007-11-28 16:29:11 UTC
(In reply to comment #6)
> Can they just be changed to just Orca+Ctrl+F<n> or
> Orca+Alt+F<n> rather then Orca+Ctrl+Alt+F<n> then?
> 
> It's still two-handed, but it's slightly easier to type.
> 

The bookmarks bindings use Shift and Alt, so Orca+Ctrl+Fn seems like the alternative that would work.  I'm OK with this -- Mike, do you foresee any need to use Orca+Ctrl+Fn for end user use?
Comment 8 Joanmarie Diggs (IRC: joanie) 2007-11-28 16:54:08 UTC
(In reply to comment #7)
> The bookmarks bindings use Shift and Alt, so Orca+Ctrl+Fn seems like the
> alternative that would work. 

Now I'm getting confused.  Is there going to be an Orca+Alt+Fn bookmark-related binding now?  (I was going to cast my vote for that alternative until I saw Will's comment).
Comment 9 Mike Pedersen 2007-11-28 21:27:35 UTC
After kicking this around with Will a bit I'd like to propose the following:
How about we use the orca key+the super-l/mod4 key  plus the function keys for the debug functionality.  I realize this isn't perfect but at least it is one less key than orca+ctrl+alt+FN.  
Comment 10 Rich Burridge 2007-11-28 21:43:31 UTC
> How about we use the orca key+the super-l/mod4 key  plus the function keys for
> the debug functionality.

Where's the super-l/mod4 key on my Sun Type 6 typeboard?
What's the label on this key?
Comment 11 Scott Haeger 2007-11-28 22:25:45 UTC
Using the function keys for the bookmark functions is proving not to be straight forward.  The were very problematic because several gnome-panel, gedit, and probably many more app specific functions are hooked to Alt+Fn.  Unfortunately, these applications seemed to be getting a first shot at acting on them. The keyevent makes it to Orca but the app specific function (often a dialog) has grabed focus.  This causes the wrong script to be called.

The next solution was to substitute Ctrl for Alt in all relevant bookmark keybindings.  However the 'F1' keyevent never makes it to Orca for Orca+Ctrl+F1.  All other function keys seem fine (in gedit and firefox, anyway) for these modifiers.  Also, single modifiers work for all function keys including F1.

The above results along with the resistance caused by the debug key bindings leads me to think that the function keys are not the best place for bookmarks or live region related stuff.  We might think how we can better use the number keys.  Are we just flat out of modifier combinations for these?  Maybe consider different modes for advanced features (eg debug commands).
Comment 12 Scott Haeger 2007-11-29 14:52:02 UTC
Additional testing shows that the F1 keystroke in Orca+Ctrl+F1 does not make it to pyatspi.
Comment 13 Scott Haeger 2007-11-29 15:24:28 UTC
Joanie observed that the desktop binding works for Orca+Ctrl+F1 meaning there is some difference between the CapsLock and the Insert key in regards to this key combination.
Comment 14 Joanmarie Diggs (IRC: joanie) 2007-11-29 15:41:13 UTC
I can confirm Scott's findings in comment #12.

Additional testing also shows that with the laptop layout, Orca+Ctrl+Fn where n > 1 seems to make it through and bind just fine.  So There's somethin' special about Orca+Ctrl+F1 in laptop layout.  Weird....
Comment 15 Willie Walker 2007-11-29 16:56:19 UTC
(In reply to comment #14)
> I can confirm Scott's findings in comment #12.
> 
> Additional testing also shows that with the laptop layout, Orca+Ctrl+Fn where n
> > 1 seems to make it through and bind just fine.  So There's somethin' special
> about Orca+Ctrl+F1 in laptop layout.  Weird....
> 

Crazy.  Well...given all the issues we're having with using the Fn keys as end user keys, especially F1, I'd guess we probably should stay away from them for numerical kinds of things (i.e., bookmarks 1 thru n).  

Mike - do you have suggestions for how we might handle both bookmarks and 'last nth' message things?  The modal stuff really should be used as a last resort, I think, since modal stuff ends up being confusing to a lot of people.
Comment 16 Joanmarie Diggs (IRC: joanie) 2007-11-29 16:59:43 UTC
More weirdness.  I tried the following:

1. Launched xev.
2. Held down Ctrl+CapsLock (and kept them held down)
3. Pressed and released: F4, F3, F2, F1, F2

For everything *but* F1, xev dumped a couple of events to the terminal window:

KeyPress event, serial 30, synthetic NO, window 0x6600001,
    root 0x59, subw 0x0, time 6943096, (797,519), root:(801,564),
    state 0x6, keycode 70 (keysym 0xffc1, F4), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 30, synthetic NO, window 0x6600001,
    root 0x59, subw 0x0, time 6943176, (797,519), root:(801,564),
    state 0x6, keycode 70 (keysym 0xffc1, F4), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

For F1 there was no such output.
Comment 17 Scott Haeger 2007-11-29 17:13:52 UTC
The mystery deepens.  Orca+Ctrl_R+F1 works but Orca+Ctrl_L+F1 does not.  Something must be special about CapsLock+Ctrl_R.
Comment 18 Willie Walker 2007-11-30 02:24:24 UTC
(In reply to comment #17)
> The mystery deepens.  Orca+Ctrl_R+F1 works but Orca+Ctrl_L+F1 does not. 
> Something must be special about CapsLock+Ctrl_R.
> 

I tried goofing with xmodmap to clear Caps Lock from the keymap.  That didn't help, either.  Yech.  Well...darn.  Mike, any good ideas for what to do if we cannot use the Fn keys in such a way?  Maybe we should use the number keys for bookmarks and just plain old Orca+Fn to read the last nth message? 

This would change the current user experience for gaim, though.
Comment 19 Scott Haeger 2007-11-30 20:37:39 UTC
Mike has laid out the following new key bindings:

- live/gaim message reviewing: Orca+Fn[1-9]
- Learn mode still moved from Orca+F1 to Orca+h
- debug keys to be unassigned.
- Bookmarks to remain unchanged from their original position.

Comment 20 Scott Haeger 2007-11-30 21:02:07 UTC
Created attachment 99923 [details] [review]
first patch for Move bookmarks keybindings to Fn keys

This patch does the following:

1) moves the Gaim 'read previous message' keys to Orca+Fn[1-9]
2) moves 'enter learn mode' to Orca+h.
3) Unassigns the key bindings for debug related functions.

"Read previous message" for live regions will be added under the live region bug #466251.

Mike, this patch is completely untested.  Please let me know what you find.
Comment 21 Mike Pedersen 2007-11-30 22:10:06 UTC
This patch has several problems.
1.  The old gaim keystrokes are still bound.  
2.  The new ones show up in key learn but do nothing.  
Comment 22 Scott Haeger 2007-12-01 01:12:59 UTC
Created attachment 99936 [details] [review]
second version of Move bookmarks keybindings to Fn keys

Oops.  I forgot to rename the event handler.  Hopefully, this one will work better.  Thanks for testing Mike.
Comment 23 Willie Walker 2007-12-02 23:06:57 UTC
I haven't looked at all the code yet, but I think we still need to define something for debuggers if we can.

How about Orca+Ctrl+Alt+{the following}, where {the_following} is one of:

listAppsHandler        - End
printActiveAppHandler  - Home
printAncestryHandler   - Page_Up   (think "looking upward in hierarchy")
printHierarchyHandler  - Page_Down (think "looking down from the top")

printMemoryUsageHandler and cycleDebugLevelHandler will go unbound.

On the desktop layout, Ctrl and Alt are usually right near each other and Insert and {End, Home, Page_Up, Page_Down} are also very close to each other.

For those that want something else, please suggest something that will not conflict with key bindings that we want for end users.
Comment 24 Scott Haeger 2007-12-03 17:46:19 UTC
Created attachment 100126 [details] [review]
third version of Move bookmarks keybindings to Fn keys

1) Added Orca+Ctrl+Alt to listAppsHandler, printActiveAppHandler, printAncestryHandler, printHierarchyHandler.  printMemoryUsageHandler and cycleDebugLevelHandler will go unbound.  These have been tested and seem good.
2)  made changes in gnome-mud to match those of gaim, namely changing read previous message to Orca+Fn, where n=1through 9.  Please test carefully.  I may have an off by one error.
Comment 25 Mike Pedersen 2007-12-03 18:22:27 UTC
Bookmarks still work and the help key change works but the gaim chat message reading does nothing. 
Comment 26 Willie Walker 2007-12-03 18:57:29 UTC
Adjusting the title of this bug.  Updated patch coming soon (minor tweaks).
Comment 27 Willie Walker 2007-12-03 19:05:55 UTC
Created attachment 100133 [details] [review]
Revised patch

This patch fixes the problem with not being able to review in gaim and it also makes a minor tweak to the debugging keys.  The new bindings are Orca+Ctrl+Alt+{the following}, where {the_following} is one of:

    reportScriptInfoHandler - End
    printActiveAppHandler   - Home
    printAncestryHandler    - Page_Up (think "look upward in hierarchy")
    printHierarchyHandler   - Page_Down (think "look down from the top")
Comment 28 Scott Haeger 2007-12-03 19:10:02 UTC
committed to trunk.  marked as fixed.