Skip to content

Repository files navigation

Konsole Keybindings for Claude Code in KDE Plasma

Status Tested KDE

Enhanced keyboard configuration for Claude Code running in Konsole terminal emulator.

Last tested: December 20, 2025 - All features working correctly on KDE Plasma 6

Problem

When using Claude Code in Konsole, several keyboard shortcuts don't work as expected:

  • Shift+Enter produces "OM" characters instead of creating new lines
  • Ctrl+Arrow keys don't navigate by word
  • Standard terminal keyboard shortcuts are missing

This happens because Konsole's default keybindings don't properly handle Claude Code's terminal input requirements.

Solution

This repository provides a custom keytab file with complete keyboard mappings for Claude Code in Konsole.

Technical Approach

The key to making both Shift+Enter and Shift+Tab work is using proper Ansi modifiers in the keytab definitions. Initial attempts using simple key definitions like key Tab : "\t" broke Shift+Tab functionality. The solution was to copy the exact Tab definitions from Konsole's default.keytab:

key Tab -Shift : "\t"
key Tab +Shift+Ansi : "\E[Z"
key Tab +Shift-Ansi : "\t"
key Backtab +Ansi : "\E[Z"
key Backtab -Ansi : "\t"

Combined with the Shift+Enter fix (key Return+Shift : "\n"), both keys now work correctly.

Features

  • Shift+Enter for multiline input
  • Shift+Tab for cycling through Claude CLI suggestions
  • Ctrl+Left/Right for word-by-word navigation
  • Ctrl+Up/Down for command history navigation
  • Ctrl+Home/End for jumping to line boundaries
  • Ctrl+Backspace/Delete for word deletion
  • All standard terminal keybindings (function keys, navigation, etc.)

Installation

Quick Install

git clone https://github.com/llupRisinglll/konsole-claude-fix.git
cd konsole-claude-fix
./install.sh

Then restart Konsole.

Manual Installation

  1. Copy the keytab file:

    mkdir -p ~/.local/share/konsole
    cp claude.keytab ~/.local/share/konsole/
  2. Install the autostart script:

    mkdir -p ~/.config/autostart-scripts
    cp konsole-fix-keybindings.sh ~/.config/autostart-scripts/
    chmod +x ~/.config/autostart-scripts/konsole-fix-keybindings.sh
  3. Create a Konsole profile:

    cat > ~/.local/share/konsole/Claude.profile << 'PROFILE_EOF'
    [General]
    Name=Claude
    Parent=FALLBACK/
    
    [Keyboard]
    KeyBindings=claude
    PROFILE_EOF
  4. Set as default profile by editing ~/.config/konsolerc:

    [Desktop Entry]
    DefaultProfile=Claude.profile
  5. Restart Konsole

Usage

After installation, the following keyboard shortcuts will work in Claude Code:

Shortcut Action
Enter Send message
Shift+Enter New line (multiline input)
Shift+Tab Cycle through suggestions
Ctrl+Left/Right Jump by word
Ctrl+Up/Down Navigate history
Ctrl+Home Jump to start of line
Ctrl+End Jump to end of line
Ctrl+Backspace Delete word backward
Ctrl+Delete Delete word forward

Requirements

  • KDE Plasma (tested on 5.x and 6.x)
  • Konsole terminal emulator
  • Claude Code CLI tool

License

MIT License - see LICENSE file for details.

Troubleshooting

Keybindings not applying

  1. Close all Konsole windows
  2. Open a new Konsole instance
  3. Verify profile: echo $KONSOLE_PROFILE_NAME should show "Claude"

Shift+Enter still not working

Apply keybindings manually:

qdbus org.kde.konsole-$(pidof konsole) /Sessions/1 org.kde.konsole.Session.setKeyBindings "claude"

Ctrl+Arrow keys not working

Verify the keytab file is installed:

ls -la ~/.local/share/konsole/claude.keytab

Other Terminals

This repository is Konsole-specific. For other terminal emulators, see OTHER_TERMINALS.md for configuration examples for Alacritty, Kitty, WezTerm, and others.

Contributing

Contributions are welcome. Please open an issue or submit a pull request.

About

Enhanced keyboard configuration for Claude Code in Konsole. Fixes Shift+Enter multiline input and adds Ctrl+Arrow word navigation for seamless terminal editing.

Topics

Resources

Contributing

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages