[Bug 482623] Re: Apple keyboard - F buttons don't work

2014-10-21 Thread Lee Mendelowitz
I posted a solution that worked for me using iTerm2 on OS X to
StackOverflow:

http://stackoverflow.com/questions/26180096/os-x-byobu-vertical-
split/26470118#26470118

It involved removing OS X keyboard shortcuts that could interfere,
updating the iTerm2 profile key map to send the correct escape
sequences, and setting the TERM environment variable to linux.

The read utility was useful for returning what escape sequences the
shell is seeing for different key combinations.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to byobu in Ubuntu.
https://bugs.launchpad.net/bugs/482623

Title:
  Apple keyboard - F buttons don't work

To manage notifications about this bug go to:
https://bugs.launchpad.net/byobu/+bug/482623/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 482623] Re: Apple keyboard - F buttons don't work

2013-09-27 Thread Dustin Keeler
I don't know if this is still open or not as it has been a while since
the last comment.

I did have a few things to add that may be related to some of the
problems described.

First I have a Macbook Pro about 5 years old now. While there are
function keys they do not operate as function keys by default. Instead
they are used to control the screen brightness, volume, keyboard
backlight, etc. To use them as function keys you have to hold down the
fn key next to the left control key as mentioned in an earlier comment.
This can however be changed in System Preferences  Keyboard. Just
check the box that says Use all F keys as standard function keys. If
you do this then the behavior is reversed. All function keys work like
function keys and if you use the fn key next to the left control key
they will then operate screen brightness, sound, etc.

In addition to knowing about this setting and it's effect you also may
need to disable some Keyboard shortcuts as the operating system may be
using them. This is done again under System Preferences  Keyboard
under the Keyboard Shortcuts tab.

The last thing is this. I was able to use F2 to open a new window but I
could not split the window with Shift-F2 or Control-F2. This drove me
mad until I found a setting to fix this. I use the built in terminal app
in OSX. If you go to the preferences menu in the terminal app you will
see a few buttons at the top. Under the settings button there are a few
sub sections on the right side such as Text, Window, Shell, Keyboard,
Advanced. Go to the Keyboard section and you will see a list of keys
and the action they are mapped to. For me the F2 key was mapped to
\033OQ. I noticed though that there was no mapping for Shift-F2 or
Control-F2. This must be my issue right?

So I found a byobu config file at
/usr/share/byobu/keybindings/f-keys.screen. In this file I found that
Shift-F2 was expecting O1;2Q and Control-F2 was expecting O1;5Q. The ^[
is the escape key which in the terminal app is \033.

So I then added the mappings in the terminal app so that Shift-F2 was
\033O1;2Q and Control-F2 was \033O1;5Q. After doing that I could now
split windows.

So it seems that for some reason the apple terminal app simply did not
send the sequence byobu was expecting. There may be other keys as well
that you need to map in the terminal app. I assume that other terminal
applications may have similar settings that need to be configured.

While this may not be relevant I have to ask. How can I find out what
sequence a program is expecting? While I found this f-keys.screen file
for byobu I have not been able to find out the information I need for
other programs. For instance tmux without byobu. Is there an all
inclusive list of what sequence a key should send somewhere? For
instance I need to know what to send for Control-Left, Control-Right,
Alt-Left, Alt-Right and others.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to byobu in Ubuntu.
https://bugs.launchpad.net/bugs/482623

Title:
  Apple keyboard - F buttons don't work

To manage notifications about this bug go to:
https://bugs.launchpad.net/byobu/+bug/482623/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs