byobu interrupts ctrl-a when keybinding is already set to another key

Bug #1045070 reported by Jeff Bauer on 2012-09-02
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
byobu
Medium
Unassigned
byobu (Ubuntu)
Undecided
Unassigned

Bug Description

I already have my screen/tmux keybindings set to ctrl-t, but when I use ctrl-a
on the command line, the following interrupt occurs:

Configure Byobu's ctrl-a behavior...

When you press ctrl-a in Byobu, do you want it to operate in:
    (1) Screen mode (GNU Screen's default escape sequence)
    (2) Emacs mode (go to beginning of line)

If I don't ctrl-c to cancel the interrupt, a new bindkey value is
appended to my keybindings, messy up my current settings:

$ cat .byobu/keybindings
source /usr/share/byobu/keybindings/common
bindkey "^T"
bindkey "^A"

Changed in byobu:
importance: Undecided → Medium
status: New → Confirmed
Dustin Kirkland  (kirkland) wrote :

Any suggestion as to how I might detect that you have already set your escape key?

Where did you set it? In ~/.screenrc?

Changed in byobu:
status: Confirmed → Incomplete
Jeff Bauer (jbauer) wrote :

In tmux, the prefix key is set in ~/.tmux.conf

  set -g prefix C-t

In screen, it would be set in ~/.screenrc

  escape "^T^T"

In both cases above I set my prefix/escape key to Ctrl-T, but byobu should probably ignore Ctrl-A whenever the value is manually set.

no longer affects: byobu (Ubuntu)
Naoki Matsumoto (nekomatu) wrote :

Sorry miss operation.
I using byobu version 5.17 + tmux 1.6 on Ubuntu precise(12.04.1)

%cat ~/.byobu/keybindings
source $BYOBU_PREFIX/share/byobu/keybindings/common
escape ^Jj

but It seemed to be already written
%cat ~/.byobu/keybindings.tmux
unbind-key -n C-a
set -g prefix ^A
set -g prefix2 ^A
bind a send-prefix

I workaround now.
set -g prefix ^J
set -g prefix2 ^J

Dana Goyette (danagoyette) wrote :

Check /usr/bin/byobu-ctrl-a, line 40:

grep -qs "^escape" "$keybindings" && bind_to="emacs"

With byobu-tmux, the option is not called "escape" at all.
Therefore, it thinks I haven't configured the escape key, and any answer proceeds to trample all over my working manually-edited configuration.
(I had to edit it manually, because setting ctrl-S through the F9 menu doesn't actually apply.)

Here's my keybindings.tmux:

unbind-key -n C-s
set -g prefix ^S
set -g prefix2 ^S
bind s send-prefix

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in byobu (Ubuntu):
status: New → Confirmed
Dustin Kirkland  (kirkland) wrote :

I just added some logic to handle this.

Changed in byobu:
status: Incomplete → Fix Committed
Changed in byobu (Ubuntu):
status: Confirmed → Fix Committed
Changed in byobu:
status: Fix Committed → Fix Released
Changed in byobu (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers