How to get ctrl-left and ctrl-right shortcuts working in X apps in XQuartz?

0

XQuartz allows us to run X applications on macos. That's particularly useful when we have a remote headless Linux machine - just ssh -X into the machine and then the GUI for any X application launched will appear on the local Mac.

This all works pretty seamlessly, with a shared clipboard and rootless windows. Keyboard shortcuts and mouse actions all work fine, except one:

Ctrl-left arrow and Ctrl-right arrow are the usual X shortcuts for moving the cursor left and right one word.

By default these wont work in XQuartz, and in particular if you don't have multiple Mission Control spaces, it will appear to fail silently.

How do you get the Ctrl-left and Ctrl-right keyboard shortcuts to work in X applications running in XQuartz?

Heath Raftery

Posted 2019-04-27T22:03:12.480

Reputation: 291

Answers

0

Bt default, Ctrl-left and Ctrl-right are quietly consumed by Mission Control in macos.

Go to System Preferences -> Keyboard -> Shortcuts and unselect "Move left a space" and "Move right a space" to allow the keyboard combinations to be passed through to X applications.

enter image description here

The effect is immediate and is trivial to restore by re-selecting these two options.

Heath Raftery

Posted 2019-04-27T22:03:12.480

Reputation: 291