Customize Keyboard Shortcuts in FontForge
FontForge does not feature a dedicated, built-in graphical interface for remapping its default keyboard shortcuts. However, you can still customize or add shortcuts by utilizing operating system-level key remapping, writing custom Python scripts with assigned hotkeys, or modifying source configuration files. This guide explains how FontForge handles shortcuts and the most effective methods to set up your preferred key bindings.
Native Interface Limitations
Unlike modern design suites, FontForge lacks a visual "Keyboard Shortcuts" preference pane. The default shortcuts mapped to primary menu commands (such as glyph transformations, metrics adjustments, and file exports) are hardcoded into the application's interface. Because of this, reassigning default keys requires working outside the standard settings menu.
Method 1: Using Operating System App Shortcuts (macOS)
If you are using macOS, you can override or assign shortcuts to any FontForge menu item natively without touching configuration files:
- Open System Settings and navigate to Keyboard > Keyboard Shortcuts.
- Select App Shortcuts from the sidebar and click the + (Add) button.
- Select FontForge from the Application dropdown.
- Type the exact name of the menu command you want to trigger in the
Menu Title field (for example,
Generate Fonts...orTransform...). - Press your desired key combination in the Keyboard Shortcut field.
- Click Done and restart FontForge for the shortcut to take effect.
Method 2: Adding Custom Shortcuts via Python Scripts
FontForge has a robust Python scripting engine. If you want shortcuts
for repetitive tasks or custom operations, you can register custom menu
items with bound hotkeys using your startup script
(~/.config/fontforge/init.py or
~/.FontForge/python/init.py):
import fontforge
def my_custom_action(data, glyph):
# Your automation logic here
pass
# Register a menu item with a shortcut
fontforge.registerMenuItem(
my_custom_action,
None,
None,
"Glyph",
"Ctrl+Shift+U",
"Custom Action"
)Any tool registered this way will appear in FontForge's menus with your specified keyboard shortcut bound to it.
Method 3: Third-Party Macro Tools (Windows and Linux)
For Windows and Linux users wanting to rebind default actions:
- Windows: Use AutoHotkey to remap specific key combinations to trigger the default FontForge shortcuts or activate menu items via Alt-key navigation chains.
- Linux: Use tools such as AutoKey or window manager keybinds to send specific keypress sequences directly to the FontForge window.
Modifying Source Hotkeys (Advanced)
For full control over standard menu keys across any platform, you can
clone the FontForge source code from GitHub, modify the shortcut
assignments directly in the source files (primarily found in the UI
definitions within the fontforgeexe/ directory), and
compile the application locally.