Keybindings does not work after update to 0.98

Bug #1494606 reported by Bjørn T Johansen
26
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Terminator
Fix Released
Medium
Unassigned

Bug Description

After I upgraded to 0.98, Ctrl-PageDown and Ctrl-PageUp does not work anymore (haven't found more that does not wok yet..)
What's strange, is that this is dependent on the chosen keyboard layout... I use both no and gb as my keyboard layouts.. And if I use gb. this keybinding work. But if I use no, then the shortcut only print 5~.
Just discovered the same problem trying to copy & paste.. Using no layout, Shift-Ctrl-C just works as Ctrl-C but using gb layout, copy & paste works as expected...

Are there some known changes in 0.98 that would do this or is there a bug somewhere?

Related branches

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Whenever I see layouts and weird input, I immediately think about IBus.

Are you running IBus?
If yes, what happens if you kill the process? (You may have to use system settings to switch between keyboard layouts after killing it.)

We did make some modifications that were to disable IBus messing up the composed characters (ö, ê, etc) not being broadcast to receivers, and this was down to IBus not passing on some events.

You could try reverting the change in http://bazaar.launchpad.net/~gnome-terminator/terminator/trunk/revision/1611
and see if it start behaving correctly afterwards.

All this will help narrow down the cause. (I'm native English, so IBus, and multi-layouts and the like are a little mysterious, so this is more about me helping you to find the source of the problem :-) )

Changed in terminator:
status: New → Incomplete
Revision history for this message
Bjørn T Johansen (btj) wrote : Re: [Bug 1494606] Re: Keybindings does not work after update to 0.98

No, I am not using ibus and I also have no such process running..

Also, I can try to change the keybinding to Ctrl-PageUp and down when I use the no layout, it still does not work...

BTJ

On Fri, 11 Sep 2015 10:19:49 -0000
Stephen Boddy <email address hidden> wrote:

> Whenever I see layouts and weird input, I immediately think about IBus.
>
> Are you running IBus?
> If yes, what happens if you kill the process? (You may have to use system settings to switch between keyboard layouts after killing it.)
>
> We did make some modifications that were to disable IBus messing up the
> composed characters (ö, ê, etc) not being broadcast to receivers, and
> this was down to IBus not passing on some events.
>
> You could try reverting the change in http://bazaar.launchpad.net/~gnome-terminator/terminator/trunk/revision/1611
> and see if it start behaving correctly afterwards.
>
> All this will help narrow down the cause. (I'm native English, so IBus,
> and multi-layouts and the like are a little mysterious, so this is more
> about me helping you to find the source of the problem :-) )
>
> ** Changed in: terminator
> Status: New => Incomplete
>

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Hmmm. How do you switch between keyboard layouts normally?

I've just tried flipping to Norwegian here (UK physical) using both IBus and the GNOME method (Super+Space) and it all seemed OK. Just to be sure, you're expecting to move to the next and previous tabs? That works with both gb and no.

Do you use Terminator with Norwegian locale/language? i.e. Regional settings are Norway specific, and the GUI is to some degree in Norwegian language? This is one thing I haven't tried.

Did you try disabling those lines from rev 1611, and did it make a difference?

A rather sledgehammer approach would be for you to get https://code.launchpad.net/~stephen-j-boddy/terminator/bugfix-1318542-double-chars
which has some extensive debugging output that helps narrow down some of the oddities in the signals, and function calls. The only thing is it's a little out of date, and I can't push updates right now. If you get it, and you're game you should be able to "bzr merge lp:terminator" the newer commits. Or you can wait till later, and I can push the updated tree. Your call.

Revision history for this message
Bjørn T Johansen (btj) wrote :

On Fri, 11 Sep 2015 11:27:53 -0000
Stephen Boddy <email address hidden> wrote:

> Hmmm. How do you switch between keyboard layouts normally?

I am using Arch with Openbox, so I run the following command when I login:

setxkbmap -layout 'gb,no' -option 'grp:alt_caps_toggle' &

>
> I've just tried flipping to Norwegian here (UK physical) using both IBus
> and the GNOME method (Super+Space) and it all seemed OK. Just to be
> sure, you're expecting to move to the next and previous tabs? That works
> with both gb and no.

Next and previous tab yes.
>
> Do you use Terminator with Norwegian locale/language? i.e. Regional
> settings are Norway specific, and the GUI is to some degree in Norwegian
> language? This is one thing I haven't tried.

No, I use en_US as locale/language.
>
> Did you try disabling those lines from rev 1611, and did it make a
> difference?

No, I have not tried that.. Will try later tonight...
>
> A rather sledgehammer approach would be for you to get https://code.launchpad.net/~stephen-j-boddy/terminator/bugfix-1318542-double-chars
> which has some extensive debugging output that helps narrow down some of the oddities in the signals, and function calls. The only thing is it's a little out of date, and I can't push updates right now. If you get it, and you're game you should be able to "bzr merge lp:terminator" the newer commits. Or you can wait till later, and I can push the updated tree. Your call.

I can try this as well later tonight..

BTJ

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

setxkbmap -layout 'gb,no' -option 'grp:alt_caps_toggle' &

OK, so that's the magic nugget that allows me to reproduce your symptoms.

And I quickly checked, and it *is* rev 1611 that is causing your issue. That's really annoying, because that was added to stop IBus screwing up dead-key combos for characters with diacritics. God! Input in Linux is a mess! OK, I'm setting to Triaged, but I'm going to have to think about how (if?) we can fix this in a way that isn't trading off one method against the other.

Is there a particular reason for using this method. It's a fairly... nerdy way of doing it.

Good feedback, that got us to the source of the problem though. Thanks!

Changed in terminator:
status: Incomplete → Triaged
importance: Undecided → Medium
Revision history for this message
Bjørn T Johansen (btj) wrote :

The only reason for using setxkbmap, is that as far as I know, Openbox does not have any support for changing keyboard layout built in...
But if you have a different way I can solve this, please let me know... :)

BTJ

On Fri, 11 Sep 2015 12:42:16 -0000
Stephen Boddy <email address hidden> wrote:

> setxkbmap -layout 'gb,no' -option 'grp:alt_caps_toggle' &
>
> OK, so that's the magic nugget that allows me to reproduce your
> symptoms.
>
> And I quickly checked, and it *is* rev 1611 that is causing your issue.
> That's really annoying, because that was added to stop IBus screwing up
> dead-key combos for characters with diacritics. God! Input in Linux is a
> mess! OK, I'm setting to Triaged, but I'm going to have to think about
> how (if?) we can fix this in a way that isn't trading off one method
> against the other.
>
> Is there a particular reason for using this method. It's a fairly...
> nerdy way of doing it.
>
> Good feedback, that got us to the source of the problem though. Thanks!
>
> ** Changed in: terminator
> Status: Incomplete => Triaged
>
> ** Changed in: terminator
> Importance: Undecided => Medium
>

Revision history for this message
Bjørn T Johansen (btj) wrote :

Also, I am a nerd and proud of it.... :)

BTJ

On Fri, 11 Sep 2015 12:42:16 -0000
Stephen Boddy <email address hidden> wrote:

> setxkbmap -layout 'gb,no' -option 'grp:alt_caps_toggle' &
>
> OK, so that's the magic nugget that allows me to reproduce your
> symptoms.
>
> And I quickly checked, and it *is* rev 1611 that is causing your issue.
> That's really annoying, because that was added to stop IBus screwing up
> dead-key combos for characters with diacritics. God! Input in Linux is a
> mess! OK, I'm setting to Triaged, but I'm going to have to think about
> how (if?) we can fix this in a way that isn't trading off one method
> against the other.
>
> Is there a particular reason for using this method. It's a fairly...
> nerdy way of doing it.
>
> Good feedback, that got us to the source of the problem though. Thanks!
>
> ** Changed in: terminator
> Status: Incomplete => Triaged
>
> ** Changed in: terminator
> Importance: Undecided => Medium
>

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

I'm afraid I have no idea with alternative keyboard management options for Arch/Openbox etc.

For the nerdy-ness I recommend frequent viewings of "Weird Science". It won't help, but it's a classic celebration of nerds ;-)

Revision history for this message
Bjørn T Johansen (btj) wrote :

OK, thx... :)

I will do some searching and see if there is another solution also...

On September 11, 2015 15:50:41 Stephen Boddy <email address hidden>
wrote:

> I'm afraid I have no idea with alternative keyboard management options
> for Arch/Openbox etc.
>
> For the nerdy-ness I recommend frequent viewings of "Weird Science". It
> won't help, but it's a classic celebration of nerds ;-)
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1494606
>
> Title:
> Keybindings does not work after update to 0.98
>
> Status in Terminator:
> Triaged
>
> Bug description:
> After I upgraded to 0.98, Ctrl-PageDown and Ctrl-PageUp does not work
> anymore (haven't found more that does not wok yet..)
> What's strange, is that this is dependent on the chosen keyboard layout...
> I use both no and gb as my keyboard layouts.. And if I use gb. this
> keybinding work. But if I use no, then the shortcut only print 5~.
> Just discovered the same problem trying to copy & paste.. Using no layout,
> Shift-Ctrl-C just works as Ctrl-C but using gb layout, copy & paste works
> as expected...
>
> Are there some known changes in 0.98 that would do this or is there a
> bug somewhere?
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/terminator/+bug/1494606/+subscriptions

Revision history for this message
sviola (sviola) wrote :

I have a similar problem with the keybindings after upgrading to 0.98 on ArchLInux. Keybindings for Copy and Paste don't work with the English (US) layout but they do work with the English (US, international AltGr Unicode combining) layout. I'm using KDE and am switching keyboard layouts through the KDE Control Module. Keybindings worked fine in the English (US) layout prior to 0.98.

Revision history for this message
Bjørn T Johansen (btj) wrote :

I had to downgrade terminator because many more keybindings did not work in either gb or no layout, like Alt-ArrowLeft and Right to move to the splitted window on left and right...

Revision history for this message
Bjørn T Johansen (btj) wrote :

I decided to just remove revision/1611 instead and now it's working fine... :)

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Yeah, hard to live without all those other juicy changes. :-)

I think I've got a partial fix. The problem with that piece of code is that fires for events even when IBus isn't running. So I have a few lines that detect if it is, and only call the code block if it isn't. Can't push it now, but I might enlist you at some point to run through some tests. That *should* fix it for your usecase. Then I need to figure out if it breaks for the running IBus dead-key chars when IBus is running, without spewing multiple chars into other terminals... Jeezus this is messy!

Revision history for this message
Bjørn T Johansen (btj) wrote :

Yes, I am a developer myself and no one said developing would be easy... ;)
But just give me a heads up and I can test those changes if you like...

Revision history for this message
aditsu (aditsu) wrote :

I noticed in bug 1408040 that the F1 key is not working for me in terminator 0.98. After some debugging, we noticed that the problem is caused by the "fix" for ibus.
terminator -d says: "Terminal::on_keypress: Ingore processed event with event.state 16384" when pressing F1, or really almost any key.
After reading through this bug report, I found that the problem goes away when I switch to the US English keyboard layout.
I'm using KDE by the way.

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Hi, this is (I hope) a fix for brokenness due to the IBus "fix". You need bzr, bzrtools and python-psutils installed.

Download the attached fix, and save it somewhere, then:

# bzr branch http://bazaar.launchpad.net/~gnome-terminator/terminator/trunk terminator-input-fix
# cd terminator-input-fix
# bzr patch <path-to-patch>/fix_input.diff

Now test it with:

# ./terminator -g deletemeconfig -u -d --debug-classes Terminal

And try all the things that were causing problems. If you find something not working, try to reduce it to the minimum output, and post it here with a description of what you did. For the record, this works for me with IBus, and with Ibus killed. I can switch keyboards to Norwegian, use dead keys, and broadcasting, including dead-key compositions, and it all works for everything I can think of.

Revision history for this message
Bjørn T Johansen (btj) wrote :

Ok, tried but I get the following error when I try to run terminator:

File "./terminator", line 124
    except (KeyError,ValueError), ex:
                                                         ^
SyntaxError: invalid syntax

Took a quick look but since I don't know python, I did not see any obvious reasons...

Revision history for this message
Bjørn T Johansen (btj) wrote :

The ^ points to the comma after the parantheses end...

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

That looks like it is trying to run it with Python 3 (syntax changed for exception statement in Py3) and when I force it the error is the same. Your distro must force Py2 somehow. You should be able to just prefix the run command with "pthon2", but perhaps your distro does it slightly different.

Revision history for this message
Bjørn T Johansen (btj) wrote :

Ok, took a peek inside the terminator file from the arch distro and they points directly to python2 instead of using the env command, so using python2 made it run..
And as far as I can see, this is now working ok for me... Thx... :)

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Yee-haw!

@aditsu and sviola: I'm going to close this as fix committed shortly, unless this is still broken for you. Alternatively just wait till the fix hits the repo, and update from there to test if the patch is a step too far :-)

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

rev. 1647

Changed in terminator:
status: Triaged → Fix Committed
Changed in terminator:
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.