Introduction
NetBeans is a popular integrated development environment (IDE) primarily for Java development but also supports other languages. Efficient use of keyboard shortcuts in NetBeans can significantly enhance your productivity. This cheat sheet provides a quick reference to some of the most commonly used NetBeans keyboard shortcuts for both Windows and macOS.
Keyboard Shortcuts Cheat Sheet
Search
Action |
Windows |
macOS |
Find usages |
Alt + F7 |
⌥ + F7 |
Find usages (results) |
Alt + Shift + U |
⌥ + Shift + U |
Find / Replace in file |
Ctrl + F / Ctrl + H |
⌘ + F / ⌘ + R |
Find / Replace in projects |
Ctrl + Shift + F / Ctrl + Shift + H |
⌘ + Shift + F / ⌘ + Shift + H |
Find next |
F3 |
⌘ + G |
Select in projects / files / favorites |
Ctrl + Shift + 1/2/3 |
⌘ + Shift + 1/2/3 |
File Navigation
Action |
Windows |
macOS |
Open resource / Navigate to file |
Alt + Shift + O |
⌥ + Shift + O |
Open type |
Ctrl + O |
⌘ + O |
Go to line |
Ctrl + G |
⌘ + G |
Recent files |
Ctrl + Shift + T |
Shift + ⌘ + T |
Tab / File switcher |
Ctrl + Tab |
⌃ + Tab |
Windows Actions
Action |
Windows |
macOS |
Maximize active window |
Shift + Escape |
Shift + Escape |
Next view (editor) |
Ctrl + Alt + PageUp/PageDown |
⌃ + ⌥ + PageUp/PageDown |
Back |
Alt + Left |
⌃ + Left |
Forward |
Alt + Right |
⌃ + Right |
Code Completion
Action |
Windows |
macOS |
Quick fix |
Alt + Enter |
⌥ + Enter |
Code completion |
Ctrl + Space |
⌃ + Space |
Text Editing Actions
Action |
Windows |
macOS |
Move lines |
Alt + Shift + Up/Down |
⌥ + Shift + Up/Down |
Delete lines |
Ctrl + E |
⌘ + E |
Copy / Duplicate lines |
Ctrl + Shift + Up/Down |
⌥ + Shift + Up/Down |
Select identifier |
Alt + Shift + J |
⌃ + Shift + J |
Format code |
Alt + Shift + F |
⌃ + Shift + F |
Code Navigation
Action |
Windows |
macOS |
Inspect code hierarchy |
Alt + Shift + F12 |
⌥ + Shift + F12 |
Open / Navigate to declaration |
Ctrl + B |
⌘ + B |
Open / Navigate to type hierarchy |
Alt + F12 |
⌥ + F12 |
Open / Navigate to member hierarchy |
Ctrl + F12 |
⌘ + F12 |
Refactoring
Action |
Windows |
macOS |
Rename |
Ctrl + R |
⌘ + R |
Surround with |
Alt + Enter |
⌥ + ⌘ + T |
Extract local variable |
Alt + Shift + V |
⌥ + Shift + V |
Extract / Assign to field |
Alt + Shift + E |
⌥ + Shift + E |
Extract method |
Ctrl + Shift + M |
⌃ + Shift + M |
Universal Access
Action |
Windows |
macOS |
Quick access / search everywhere |
Ctrl + I |
⌘ + I |
Conclusion
This cheat sheet provides a quick reference to the most commonly used keyboard shortcuts in NetBeans, helping you navigate and operate your development environment more efficiently. Keep this guide handy to enhance your productivity and streamline your coding workflow. Happy coding!