Change GNU Screen Keyboard Command

I changed the command character for screen from Control-a to Control-b recently, after switching to a wireless Mac keyboard. On this small, portable keyboard—which is the same layout as most Mac laptops—there’s only one Control key, and it’s on the left side of the keyboard.

The weird angle to hit Control-a was hurting my hand. Gone now is the left-side contortion I was forced to make to strike with my pinky and ring finger.

It’s pretty easy to change the command key mapping, just add escape ^Bb to your screen config file (usually located in your home directory). Here’s what my .shellrc looks like:

# Make the shell in every window as your login shell
shell -$SHELL

# Instead of Control-a, make the escape/command character be Control-b
escape ^Bb

# Autodetach session on hangup instead of terminating screen completely
autodetach on

# Turn off the splash screen
startup_message off

# Use a 100000-line scrollback buffer
defscrollback 100000

Published by

Lance Willett

My name is Lance, I am a blogger, product manager, software developer, and business executive creating high-quality, engaging, and customer-centered experiences for people online. México-born.

8 thoughts on “Change GNU Screen Keyboard Command”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.