disabling keybindings doesn't work when the escape sequence is changed from ctrl-a

Bug #389129 reported by Shane D
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
byobu
Fix Released
Low
Dustin Kirkland 

Bug Description

If you re-map your escape sequence to something other than control-a, the disable/enable keybinding doesn't work. I have mine as ctrl-x. Now if you try the ctrl-x-) to disable the keybindings, it fails. I made my own custom copy of "common" keybindings and change the string that syas "^a" to "^x" and now it works. Looks like this is a static assignment and not dynamic. Basically enable/disable are useless to those that use something other than ctrl-a as their escape sequence.

% byobu --version
Screen version 4.00.03jw4 (FAU) 2-May-06

Related branches

Changed in byobu:
assignee: nobody → Dustin Kirkland (kirkland)
importance: Undecided → Low
status: New → Fix Committed
Changed in byobu:
status: Fix Committed → Fix Released
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

This should be working in the 2.12 release.

Note that I have switched from the ctrl-x-) and ctrl-x-( to a single toggle keysequence, ctrl-x-! which enables/disables the f-keys.

The other shortcuts are documented in /usr/share/byobu/keybindings/screen-escape-keys for now, and in the manpage soon.

:-Dustin

Revision history for this message
Shane D (dimensional) wrote :

It seems to half work. I can disable the keybindings with ctrl-x-! however when I try to re-enable the keybindings with ctrl-x-!, I get the same error as before:

swdixon(16387)% :source /usr/share/byobu/keybindings/f-keys
zsh: command not found: :source
zsh: exit 127 :source /usr/share/byobu/keybindings/f-keys

I change the escape key to ctrl-a and I can both enable and disable successfully. Change back to ctrl-x and it half works

Revision history for this message
Dustin Kirkland  (kirkland) wrote : Re: [Bug 389129] Re: disabling keybindings doesn't work when the escape sequence is changed from ctrl-a

I think you have a garbled ~/.byobu/keybindings file, perhaps one that
was created before support for this feature really evolved. Can you
move that file out of the way, restart byobu, and see if it works?

If you still see the problem, could you attach that file to this bug report?

:-Dustin

Revision history for this message
Shane D (dimensional) wrote :

I did an rm -rf .byobu, then aptitude purged byobu, then installed again and the same thing happens. I thought maybe something in my shell was mucking up the keybindings, so I tried csh and bash and they both do the same as zsh. Here is my keybindings file:

% cat keybindings
source /usr/share/byobu/keybindings/common
escape ^Xx
register r "^x:source $HOME/.byobu/profile^M" # | Goes with F5 definition
register t "^xA^aa^k^h" # | Goes with the F8 definition
register d "^x:source /usr/share/byobu/keybindings/screen-escape-keys^M"
register r "^x:source $HOME/.byobu/profile^M"
register e "^x:source /usr/share/byobu/keybindings/f-keys^M"

I've tried in gnome-terminal, konsole, and the system console and they all act the same so I know it's no application interfering with the ctrl-x after keys are disabled. If I manually type in ctrl-x :source /usr/share/byobu/keybindings/f-keys, then it works, so that's at least a temporary workaround. And, again, if I switch back to ctrl-a, everything works fine. If I try other keys other than 'x', (i.e. ctrl-u, ctrl-b, etc), I still have the same issue.

Revision history for this message
Shane D (dimensional) wrote :

If I manually go into the /usr/share/byobu/keybindings/screen-escape-keys and change the line

register e "^a:source /usr/share/byobu/keybindings/f-keys^M"

to

register e "^x:source /usr/share/byobu/keybindings/f-keys^M"

then everything works. It's almost like it doesn't ever get the definition of "register e" in my .byobu/keybindings file. It's like it's just ignored.

Revision history for this message
mp3foley (mp3foley) wrote :

Still seeing this problem under Ubuntu Lucid 10.04
$ byobu -v
byobu version 2.68
Screen version 4.00.03jw4 (FAU) 2-May-06

Same behavior as reported by Shane Dixon. Changing my escape key to something different half works. It will disable the F keys, but when trying to re-enable them I get ":source /usr/share/byobu/keybindings/f-keys"

This is with a fresh byobu config. I did "rm -r ~/.byobu" before testing for this bug report.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Can you please test the version in the Byobu PPA?

sudo apt-add-repository ppa:byobu/ppa

And upgrade to the latest?

If it's fixed there, I can try to get a fix SRU'd to Lucid.

If not, then I can look into fixing it.

Thanks!

Revision history for this message
Shane D (dimensional) wrote :

I just tested this with 2.80-ubuntu1~ppa4 and the key bindings will disable with ctrl-x-!, but then they won't re-enable. Here's the message:

% :source /usr/share/byobu/keybindings/f-keys
zsh: command not found: :source

If I manually type control-x then ":" and the source line above, then it works. It looks like it's just the ctrl-x-! when f-keys are disabled.

--
Shane

Revision history for this message
Shane D (dimensional) wrote :

It's also noteworthy that my hack from 2009-06-22 still seems to work to fix this temporarily, but one has to manually edit the file after changing the keybindings for it to work properly.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

All,

Please file a new bug about this one, and I'll get it fixed in HEAD, and an SRU out to Lucid. The current issues are symptoms of a different problem than the original bug.

Thanks,
Dustin

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.