# How to Customize Keyboard Shortcuts in PhotoGIMP: Complete Guide

> Easily customize keyboard shortcuts in PhotoGIMP using the graphical editor or by editing the shortcutsrc file. Follow our complete guide for a personalized workflow.

- Repository: [Diolinux/PhotoGIMP](https://github.com/Diolinux/PhotoGIMP)
- Tags: how-to-guide
- Published: 2026-05-20

---

**You can customize keyboard shortcuts in PhotoGIMP by either using the graphical editor at Edit → Keyboard Shortcuts or by manually editing the `.config/GIMP/3.0/shortcutsrc` file in your GIMP configuration directory, where each shortcut is defined as an s-expression that activates when uncommented.**

PhotoGIMP is a patch that overwrites GIMP 3.0's configuration files with a Photoshop-style layout. Customizing keyboard shortcuts in PhotoGIMP allows you to personalize the Photoshop-mapping while retaining the familiar interface structure.

## Where PhotoGIMP Stores Keyboard Shortcuts

PhotoGIMP stores all keyboard bindings in the `shortcutsrc` file within GIMP's user configuration directory. When you install PhotoGIMP, this file is copied to:

- **Linux**: `~/.config/GIMP/3.0/shortcutsrc`
- **Windows**: `%APPDATA%\GIMP\3.0\shortcutsrc`
- **macOS**: `~/Library/Application Support/GIMP/3.0/shortcutsrc`

This file contains the complete set of pre-configured Photoshop-matching shortcuts. GIMP reads this file at startup to map actions to key combinations, making it the single source of truth for your shortcut configuration.

## Understanding the shortcutsrc File Format

The `shortcutsrc` file begins with a header containing `(file-version 1)` followed by s-expression definitions for each action. Each shortcut uses the `(action "...")` syntax:

```lisp
(action "action-name" "keybinding")

```

For example, the standard undo action appears as:

```lisp
(action "edit-undo" "<Primary>z")

```

The `<Primary>` token represents the Ctrl key on Linux/Windows or Command on macOS. Lines beginning with `#` are comments and are ignored by GIMP. Removing the `#` activates the shortcut; adding it disables the binding.

## Method 1: Using the Graphical Keyboard Shortcut Editor

The simplest way to customize shortcuts is through GIMP's built-in editor. Navigate to **Edit → Keyboard Shortcuts** to open the interactive interface. This tool allows you to search for specific actions and assign new keys without touching configuration files directly.

When you modify shortcuts through the GUI, GIMP automatically updates the `shortcutsrc` file with proper syntax. Changes take effect immediately without requiring a restart, making this method ideal for experimentation.

## Method 2: Editing the shortcutsrc File Directly

For bulk modifications or version control, manually edit the configuration file. Always back up the original first:

```bash
cp ~/.config/GIMP/3.0/shortcutsrc ~/.config/GIMP/3.0/shortcutsrc.backup

```

To change a shortcut, locate the action in the file and modify the keybinding. For example, to change Undo from **Ctrl+Z** to **Ctrl+U**, change:

```lisp

# (action "edit-undo" "<Primary>z")

```

To:

```lisp
(action "edit-undo" "<Primary>u")

```

Save the file and restart GIMP to apply changes. Alternatively, reload the configuration via **Edit → Preferences → Reset Keyboard Shortcuts** without restarting.

## Common Customization Examples

### Remapping Tool Shortcuts

To change the Crop tool from `c` to **Shift+C**, modify the line to:

```lisp
(action "tools-crop" "<Shift>c")

```

### Disabling Unwanted Shortcuts

Comment out lines to disable specific shortcuts:

```lisp

# (action "tools-eraser" "e")

```

### Adding Custom Action Bindings

Assign shortcuts to rarely used filters by adding new lines:

```lisp
(action "filters-emboss" "<Primary><Alt>e")

```

### Batch Editing with sed

On Linux or macOS, use `sed` for bulk replacements:

```bash
sed -i 's/<Primary>z/<Primary>u/g' ~/.config/GIMP/3.0/shortcutsrc

```

## Related Configuration Files

PhotoGIMP modifies several files to create the Photoshop experience. Understanding these helps you customize the complete environment:

- **`.config/GIMP/3.0/toolrc`**: Defines tool ordering and default options
- **`.config/GIMP/3.0/sessionrc`**: Stores window layout and panel positions
- **`.config/GIMP/3.0/dockrc`**: Controls dockable panel configurations

These files work alongside `shortcutsrc` to maintain the PhotoGIMP layout. Modifying shortcuts only affects the `shortcutsrc` file, preserving your other interface settings.

## Summary

- PhotoGIMP stores shortcuts in `.config/GIMP/3.0/shortcutsrc` (Linux), `%APPDATA%\GIMP\3.0\shortcutsrc` (Windows), or `~/Library/Application Support/GIMP/3.0/shortcutsrc` (macOS)
- The file uses `(action "name" "keybinding")` syntax with `<Primary>` representing Ctrl/Cmd
- Comment lines with `#` to disable; remove `#` to activate
- Use **Edit → Keyboard Shortcuts** for immediate changes or edit the file directly for batch modifications
- Restart GIMP after manual edits to load the new configuration

## Frequently Asked Questions

### How do I reset PhotoGIMP shortcuts to the default Photoshop layout?

Delete the modified `shortcutsrc` file or restore your backup, then restart GIMP. PhotoGIMP will regenerate the default Photoshop-style shortcuts from its installation files on the next launch.

### Can I use GIMP's standard shortcut editor with PhotoGIMP installed?

Yes. The graphical editor at **Edit → Keyboard Shortcuts** modifies the same `shortcutsrc` file that PhotoGIMP provides. Both methods are fully compatible, and changes persist across sessions regardless of which method you use.

### What does `<Primary>` mean in the shortcutsrc syntax?

`<Primary>` represents the primary modifier key: Ctrl on Linux and Windows, or Command (⌘) on macOS. This token ensures cross-platform compatibility in the configuration file without requiring separate entries for each operating system.

### Why are some actions commented out with # in the shortcutsrc file?

Commented lines represent available GIMP actions that PhotoGIMP leaves unbound by default. Uncommenting these lines by removing the `#` character activates the shortcut without requiring you to look up the exact action name in GIMP's source code.