1

Byobu has some keybindings that require a modifier key and a function key, like Shift+f2 or Ctrl+f7. Unfortunately macOS picks these up instead and does god knows what with them. How do I send these key combinations to iTerm2?

  • Did you try with & without Fn ? e.g. Shift/F2 & Shift/Fn/F2 – Tetsujin Apr 17 '17 at 16:41
  • yes and it still doesn't work – LoganDark Apr 17 '17 at 17:26
1

You can disable shortcuts used by MacOS. To do this:

  • Open System Preferences (under the Apple menu)
  • Select Keyboard
  • Click Shortcuts

Here you'll see several sets of shortcuts you can toggle. The two lists you'll want to look at are Mission Control and Keyboard. Uncheck anything that uses a function key. Your various function keys should now work inside Byobu.

Notes:

You can change whether you have to hold Fn to use a function key. Under the Keyboard tab, check "Use F1, F2, etc. keys as standard function keys."

While you're in the shortcuts tab, you might scroll around and see what other shortcuts MacOS has to offer. You might see something useful to you or notice another keyboard shortcut that's been getting in your way.

  • Already disabled FN for function keys. It's just annoying. It's also not related to the question. – LoganDark Aug 9 '17 at 1:16
  • That part was under the Notes section and was intended to provide extra context to other people coming here with the same (or similar) question. The main part of the answer is above the Notes. Were you able to solve your problem by disabling the function key shortcuts? – Joel Murphy Aug 9 '17 at 15:02
1

I had exactly the same issue and it seems to have been solved in the latest iTerm2. But if your profile was created before the fix like mine, a little configuration is needed:

  1. Go to Preferences -> Profiles -> <Your Profile> -> Terminal, make sure 'Report terminal type' is set to xterm-256color (or xterm)
  2. Go to Preferences -> Profiles -> <Your Profile> -> Keys, click Presets -> xterm Defaults

And then you can see ^F1 ... ^F12 being correctly mapped: iTerm2 key mappings

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .