Opened 11 years ago

Closed 11 years ago

Last modified 7 years ago

#1075 closed defect (fixed)

Since the Sugar switch to Metacity, Sugar shell specific key shortcuts all fail

Reported by: garycmartin Owned by: tomeu
Priority: Normal Milestone:
Component: Sugar Version: 0.85.x
Severity: Major Keywords: r+
Cc: sayamindu, tomeu, sascha_silbe Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

Currently none of the Sugar shell specific keyboard shortcuts are working. None of the function key work for switching zoom views, shift-alt-o for Journal search, and shift alt f for frame also fail to have any effect. This may be a sugar issue, I've not been able to test 0.85.x out side of sugar-jubuild under F11.

Change History (16)

comment:1 follow-up: Changed 11 years ago by garycmartin

  • Cc sayamindu tomeu added

Hi Tomeu, in another ticket I noticed you mentioned about handling Sugar keys as globalkey extensions... So this ticket is not a Metacity changeover glitch, but intended behaviour as there is another plan to pick-up Sugar shortcut keys in a new way, yet to be implemented?

comment:2 Changed 11 years ago by sascha_silbe

  • Cc sascha_silbe added
  • Component changed from sugar-jhbuild to sugar
  • Owner changed from sascha_silbe to tomeu

Reassigning as it's a problem of sugar that just happens to show in sugar-jhbuild because it contains the latest development versions.

comment:3 in reply to: ↑ 1 ; follow-up: Changed 11 years ago by tomeu

Replying to garycmartin:

Hi Tomeu, in another ticket I noticed you mentioned about handling Sugar keys as globalkey extensions... So this ticket is not a Metacity changeover glitch, but intended behaviour as there is another plan to pick-up Sugar shortcut keys in a new way, yet to be implemented?

No, I suspect metacity is grabbing the keys we need, would be nice to have a list of the keys that are failing, these are probably logged in the shell.log.

comment:4 in reply to: ↑ 3 ; follow-up: Changed 11 years ago by garycmartin

Replying to tomeu:

No, I suspect metacity is grabbing the keys we need, would be nice to have a list of the keys that are failing, these are probably logged in the shell.log.

Well, all of them I think :-) Here's the list from shell.log:

** (sugar-session:16002): WARNING **: Keycode out of bounds: 0 for key XF86AudioMute
** (sugar-session:16002): WARNING **: Keycode out of bounds: 0 for key XF86Search
** (sugar-session:16002): WARNING **: Keycode out of bounds: 0 for key XF86AudioRaiseVolume
** (sugar-session:16002): WARNING **: Keycode out of bounds: 0 for key Print
** (sugar-session:16002): WARNING **: Keycode out of bounds: 0 for key <alt>F9
** (sugar-session:16002): WARNING **: Keycode out of bounds: 0 for key <alt>Escape
** (sugar-session:16002): WARNING **: Keycode out of bounds: 0 for key <alt><shift>Tab
** (sugar-session:16002): WARNING **: Keycode out of bounds: 0 for key XF86AudioLowerVolume
** (sugar-session:16002): WARNING **: Keycode out of bounds: 0 for key <alt>1
** (sugar-session:16002): WARNING **: Keycode out of bounds: 0 for key <alt><shift>v
** (sugar-session:16002): WARNING **: Keycode out of bounds: 0 for key <alt><shift>r
** (sugar-session:16002): WARNING **: Keycode out of bounds: 0 for key <alt><shift>s
** (sugar-session:16002): WARNING **: Keycode out of bounds: 0 for key <alt><shift>q
** (sugar-session:16002): WARNING **: Keycode out of bounds: 0 for key <alt><shift>f
** (sugar-session:16002): WARNING **: Keycode out of bounds: 0 for key F12
** (sugar-session:16002): WARNING **: Keycode out of bounds: 0 for key <alt><shift>o
** (sugar-session:16002): WARNING **: Keycode out of bounds: 0 for key F10
** (sugar-session:16002): WARNING **: Keycode out of bounds: 0 for key F11
** (sugar-session:16002): WARNING **: Keycode out of bounds: 0 for key <alt>Tab
** (sugar-session:16002): WARNING **: Keycode out of bounds: 0 for key F1
** (sugar-session:16002): WARNING **: Keycode out of bounds: 0 for key F2
** (sugar-session:16002): WARNING **: Keycode out of bounds: 0 for key F3
** (sugar-session:16002): WARNING **: Keycode out of bounds: 0 for key F4
** (sugar-session:16002): WARNING **: Keycode out of bounds: 0 for key F9
** (sugar-session:16002): WARNING **: Keycode out of bounds: 0 for key <alt>F12
** (sugar-session:16002): WARNING **: Keycode out of bounds: 0 for key <alt>F10
** (sugar-session:16002): WARNING **: Keycode out of bounds: 0 for key <alt>F11

comment:5 in reply to: ↑ 4 ; follow-up: Changed 11 years ago by tomeu

Replying to garycmartin:

Replying to tomeu:

No, I suspect metacity is grabbing the keys we need, would be nice to have a list of the keys that are failing, these are probably logged in the shell.log.

Well, all of them I think :-) Here's the list from shell.log:

Hmm, that doesn't seems like metacity, have you updated recently to a newer version of Xephyr?

comment:6 in reply to: ↑ 5 ; follow-up: Changed 11 years ago by garycmartin

Replying to tomeu:

Replying to garycmartin:

Replying to tomeu:

No, I suspect metacity is grabbing the keys we need, would be nice to have a list of the keys that are failing, these are probably logged in the shell.log.

Well, all of them I think :-) Here's the list from shell.log:

Hmm, that doesn't seems like metacity, have you updated recently to a newer version of Xephyr?

Not that I know of... I'm running a clean install of F11 with updates applied and then anything sugar-jhbuild tells me to install. I don't use it for anything else other than running sugar-jhbuild. FWIW: I was trying to find out what version of Xephyr is running, but I can't get it to spit out a version string – any ideas?

comment:7 in reply to: ↑ 6 ; follow-up: Changed 11 years ago by tomeu

Replying to garycmartin:

Replying to tomeu:

Hmm, that doesn't seems like metacity, have you updated recently to a newer version of Xephyr?

Not that I know of... I'm running a clean install of F11 with updates applied and then anything sugar-jhbuild tells me to install. I don't use it for anything else other than running sugar-jhbuild. FWIW: I was trying to find out what version of Xephyr is running, but I can't get it to spit out a version string – any ideas?

Ok, tracked this down to a bug in the base X server:

https://bugs.freedesktop.org/show_bug.cgi?id=23470

The code affected has changed totally since then in git head, so in future releases this may not happen at all.

For now, would be ideal if distros picked up that patch. Otherwise we can workaround it in sugar-emulator.

comment:8 in reply to: ↑ 7 Changed 11 years ago by tomeu

  • Milestone changed from Unspecified by Release Team to 0.86
  • Priority changed from Unspecified by Maintainer to Normal

Replying to tomeu:

For now, would be ideal if distros picked up that patch. Otherwise we can workaround it in sugar-emulator.

If anyone wants to see this fixed in their distros, they need to enter a ticket there.

comment:9 Changed 11 years ago by DanKrejsa

A couple of notes. I also see this running sugar-emulator under jhbuild on Fedora 11.
The Xephyr version is
$ rpm -qa | grep Xephyr
xorg-x11-server-Xephyr-1.6.4-0.1.fc11.i586
so it's not just restricted to version 1.6.3.
I tried running the get_mapping.py script attached to the

https://bugs.freedesktop.org/show_bug.cgi?id=23470

bug report. I ran

python get_mapping.py

in an xterm in Xephyr, closing the xterm (only client of the Xephyr server),
started a new xterm in the Xephyr server, and running 'python get_mapping.py'
again; I see no difference in the keymaps that are printed out. The keymaps
are not empty in either case. Maybe I'm misunderstanding how you meant to
run get_mapping.py? Also no difference in the keymaps if I just run
get_mapping.py twice in the xterm.

I did notice that if I delete .sugar/default/gconf/desktop/sugar/user/%gconf.xml
before starting sugar-emulator, the function keys are handled properly and
the 'Keycode out of bounds' messages do not appear in shell.log. But if I
shut down sugar emulator and restart it, on the next run the function keys
stop working again.

That indicates that something is being done differently when
.sugar/default/gconf/desktop/sugar/user/%gconf.xml
needs to be created, which makes the sugar key bindings work; so probably at
least a workaround is possible. (Possibly the interaction when one has to
reenter one's sugar name and choose one's colors is involved... I've seen
Xephyr key mapping issues in the past in which remapping operations failed
unless done after initial user interaction, not that I understand this well.)

OK, one correction. I finally figured out how you meant get_mapping.py to be run.
After closing all clients in the Xephyr server and setting the environment variable
DISPLAY in an external shell to the Xephyr's display number, if I then run
'python get_mapping.py' twice, on the 2nd time all the mappings are 'None None None None'.
BUT if I then start an xterm in the Xephyr server, and type a key in the xterm,
and then go back to the external shell and run 'python get_mapping.py', the
keycodes come back (no longer all 'None None None None'). Not sure what to make
of this.

comment:10 follow-up: Changed 11 years ago by DanKrejsa

Hmm, one workaround that seems to work for me is to modify the code
that starts Xephyr (sugar/src/jarabe/util/emulatory.py to add
the '-noreset' option to the Xephyr command line.

[dlkrejsa@localhost util]$ git diff emulator.py
diff --git a/src/jarabe/util/emulator.py b/src/jarabe/util/emulator.py
index d2dacb5..511e55a 100644
--- a/src/jarabe/util/emulator.py
+++ b/src/jarabe/util/emulator.py
@@ -56,6 +56,9 @@ def _run_xephyr(display, dpi, dimensions, fullscreen):
         cmd.append('-dpi')
         cmd.append('%d' % dpi)
 
+    # Workaround for ticket #1075
+    cmd.append('-noreset')
+
     result = gobject.spawn_async(cmd, flags=gobject.SPAWN_SEARCH_PATH)
     pid = result[0]

comment:11 in reply to: ↑ 10 Changed 11 years ago by garycmartin

Replying to DanKrejsa:

Hmm, one workaround that seems to work for me is to modify the code
that starts Xephyr (sugar/src/jarabe/util/emulatory.py to add
the '-noreset' option to the Xephyr command line.

Hey fantastic, I can confirm that after adding the -noreset Xephyr option, all function and custom sugar keys are working great!

comment:12 Changed 11 years ago by wadeb

Indeed, adding the -noreset patch fixed function keys and shell accelerators for me too. Thanks!!

comment:13 Changed 11 years ago by walter

It works for me as well, except for the arrow keys. But it sure is nice having the zoom keys again :)

comment:14 Changed 11 years ago by tomeu

  • Keywords r? added

comment:15 Changed 11 years ago by tomeu

  • Keywords r+ added; r? removed
  • Resolution set to fixed
  • Status changed from new to closed

comment:16 Changed 7 years ago by dnarvaez

  • Milestone 0.86 deleted

Milestone 0.86 deleted

Note: See TracTickets for help on using tickets.