Hotkeys wan`t work in different keyboard layout

Bug #240184 reported by SkAZi
2
Affects Status Importance Assigned to Milestone
PyRoom
Fix Released
Medium
Florian Heinle
0.3
Fix Released
Undecided
Florian Heinle

Bug Description

Now is only <Ctrl-Z> working in other layout (in my case is Russian).
It will be good idea to make shortcuts work in all languages.

Revision history for this message
Florian Heinle (tiax) wrote :

looks like no one has a different keyboard layout. I have a German one, but I don't think that one's different enough to triage your bug ;)

Maybe you could provide some more information? When you press e.g. Ctrl+H while using russian keyboard layout, no help shows up? What charakter appears when you press the usual H key while on Russian layout?

Revision history for this message
SkAZi (scsiboy) wrote :

Nope, i can list of all symbols in russian, but imho it is not good solution, there is: Arabic, Chianeese and much more.
Control keypressing by hardware keycodes is better, i think. My solution in attachment.

Revision history for this message
Florian Heinle (tiax) wrote :

yeah that's why I asked. Because we're just catching H, not the key per se.

I'll be testing your patch in a minute

Florian Heinle (tiax)
Changed in pyroom:
assignee: nobody → tiax
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Adam Rooke (abelianr) wrote : Re: [Bug 240184] Re: Hotkeys wan`t work in different keyboard layout

I'm not an expert - but could this patch not totally break down?

Building documentation could be totally impossible as the short cuts would
be totally dependent on the keyboard layout, regardless of language. For
example,
"To access help press ctrl - (h, other symbol from any other keyboard
layout)"

I will just have a scout and see how gedit manages it
2008/7/12 tiax <email address hidden>:

> ** Changed in: pyroom
> Importance: Undecided => Medium
> Assignee: (unassigned) => tiax (tiax)
> Status: New => In Progress
>
> --
> Hotkeys wan`t work in different keyboard layout
> https://bugs.launchpad.net/bugs/240184
> You received this bug notification because you are a member of PyRoom
> Bug Squad, which is subscribed to PyRoom.
>
> Status in PyRoom: distraction-free writing: In Progress
>
> Bug description:
> Now is only <Ctrl-Z> working in other layout (in my case is Russian).
> It will be good idea to make shortcuts work in all languages.
>

Revision history for this message
SkAZi (scsiboy) wrote :

> "To access help press ctrl - (h, other symbol from any other keyboard layout)"

No, no, no, it is always Ctrl-H, but it is just works when another keyboard layout selected.
It is very annoying, when i going to save my russian-languaged document, or create another buffer,
or somethin other, i must switch my keyboard layout.
There is no case in i18n of hotkeys. Us (uk) layout presents in any keyboard, and it is right that
control codes is always on english.

Revision history for this message
Adam Rooke (abelianr) wrote : Re: [Bug 240184] Re: Hotkeys wan`t work in different keyboard layout

On Sun, Jul 13, 2008 at 06:15:37AM -0000, SkAZi wrote:
> > "To access help press ctrl - (h, other symbol from any other keyboard
> layout)"
>
> No, no, no, it is always Ctrl-H, but it is just works when another keyboard layout selected.
> It is very annoying, when i going to save my russian-languaged document, or create another buffer,
> or somethin other, i must switch my keyboard layout.
> There is no case in i18n of hotkeys. Us (uk) layout presents in any keyboard, and it is right that
> control codes is always on english.
>
I knew it would always be Ctrl-H on US style keyboards - I meant in
other keyboard layourts we wouldn't know what to expect.

That is the reason I'm slightly unhappy with it - at the moment we
know exactly what the code does, even if it is not sufficent for all
situations. However, using keycodes means that there are some
situations where none of the documentation will be relevant and we
don't know what the shortcuts will be.

I think there has got to be a better solution that will almost act
like:
gtk.keysym._(h): .....
where the translator can set the keyboard shortcut.

Revision history for this message
Florian Heinle (tiax) wrote :

Applying the patch changed "Undo" from Ctrl+Z to Ctrl+Y on my German keyboard layout

Revision history for this message
Adam Rooke (abelianr) wrote : Re: [Bug 240184] Re: Hotkeys wan`t work in different keyboard layout

Worked as expected on mine, ctrl-y is redo.

I think we should leave this until we can come up with a solution that is
more locale based, if that makes sense, and allows changing by the
translator when neccessary. Changing it to these hard coded values is just
unpredictable.

2008/7/13 tiax <email address hidden>:

> Applying the patch changed "Undo" from Ctrl+Z to Ctrl+Y on my German
> keyboard layout
>
> --
> Hotkeys wan`t work in different keyboard layout
> https://bugs.launchpad.net/bugs/240184
> You received this bug notification because you are a member of PyRoom
> Bug Squad, which is subscribed to PyRoom.
>
> Status in PyRoom: distraction-free writing: In Progress
>
> Bug description:
> Now is only <Ctrl-Z> working in other layout (in my case is Russian).
> It will be good idea to make shortcuts work in all languages.
>

Revision history for this message
Florian Heinle (tiax) wrote :

Oh I didn't mean to say it came to me as a surprise that ctrl+y/ctrl+z were switched - German keyboard layouts are QWERTZ and the Y is next to the X.

What I wanted to say: we can't apply that patch like this, it's breaking keycodes even for German users. Or french users (AZERTY).

Revision history for this message
Adam Rooke (abelianr) wrote :

I will have a look at this next week and see if there is something that can
be implemenented. Definitely needs looking at, but as you said, the patch in
its current form cannot be used.
2008/7/13 tiax <email address hidden>:

> Oh I didn't mean to say it came to me as a surprise that ctrl+y/ctrl+z
> were switched - German keyboard layouts are QWERTZ and the Y is next to
> the X.
>
> What I wanted to say: we can't apply that patch like this, it's breaking
> keycodes even for German users. Or french users (AZERTY).
>
> --
> Hotkeys wan`t work in different keyboard layout
> https://bugs.launchpad.net/bugs/240184
> You received this bug notification because you are a member of PyRoom
> Bug Squad, which is subscribed to PyRoom.
>
> Status in PyRoom: distraction-free writing: In Progress
>
> Bug description:
> Now is only <Ctrl-Z> working in other layout (in my case is Russian).
> It will be good idea to make shortcuts work in all languages.
>

Revision history for this message
SkAZi (scsiboy) wrote :

Hm, yes, i`m forget about QWERTZ and AZERTY keyboards, you are right.
Interesting how it`s realized in other projects?

** By the way such bug is 6,5-years-old known bug in Mozilla Firefox, it is
was fixed only some month ago in version 3.0 alpha =)

Revision history for this message
SkAZi (scsiboy) wrote :

Ok, there is gtk.gdk.Keymap object, let`s try another time via it.
That`s solution using hardware_keycode again, but builds bindings dynamically.
I have another solution, through event.keyval, but it also use hardware keyorder,
so i prefered this way.

tiax, can you test it, please, i haven`t any QWERTZ, AZERTY keyboard here.

* patch is for clean 0.2 version, not for my first-patched code.

Revision history for this message
Florian Heinle (tiax) wrote :

I applied the patch to current trunk and factored some things out. It seems to work for me here, with QWERTZ layout and every key combination working as expected. Still, some testing would be necessary.

on a sidenote, to avoid some hacks, I changed "save_file_as" to Ctrl+A, which removes some ambiguity from our keyboard bindings, as Ctrl+S has one and only one function now. I'll file a new bug report for discussion about this, though.

Revision history for this message
Adam Rooke (abelianr) wrote :

Ctrl+A is massively useful for select all :-)
Maybe change it to something else that isn't already bound to a shortcut.

2008/7/15 tiax <email address hidden>:

> I applied the patch to current trunk and factored some things out. It
> seems to work for me here, with QWERTZ layout and every key combination
> working as expected. Still, some testing would be necessary.
>
> on a sidenote, to avoid some hacks, I changed "save_file_as" to Ctrl+A,
> which removes some ambiguity from our keyboard bindings, as Ctrl+S has
> one and only one function now. I'll file a new bug report for discussion
> about this, though.
>
> --
> Hotkeys wan`t work in different keyboard layout
> https://bugs.launchpad.net/bugs/240184
> You received this bug notification because you are a member of PyRoom
> Bug Squad, which is subscribed to PyRoom.
>
> Status in PyRoom: distraction-free writing: In Progress
>
> Bug description:
> Now is only <Ctrl-Z> working in other layout (in my case is Russian).
> It will be good idea to make shortcuts work in all languages.
>

Revision history for this message
SkAZi (scsiboy) wrote :

Think Ctrl-Shift-S is better for "Save as...", it just needs in less dirty realisation.

Revision history for this message
Florian Heinle (tiax) wrote : Re: [Bug 240184] Re: Hotkeys wan`t work in different keyboard layout

Ok, I changed it back to Ctrl+Shift+S, which indeed makes more sense
than replacing Select-All ;)

I think that branch could be merged now, but somehow my latest revision
doesn't show up in launchpad. I'll try again later.

PS: I'm tagging this bug as "fixcommitted". We really shouldn't tag bugs
"fixreleased" as long as there hasn't been a new release of pyroom that
features those particular bugfixes.

 status fixcommited

Changed in pyroom:
status: In Progress → Fix Committed
Revision history for this message
Florian Heinle (tiax) wrote :

added to 0.3 milestone

Changed in pyroom:
milestone: none → 0.3
Florian Heinle (tiax)
Changed in pyroom:
status: Fix Committed → Fix Released
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.