If you use a keyboard layout for another Latin-script alphabet, some shortcuts may not work because characters used in those shortcuts may not have dedicated keyboard keys.įor example, there is no dedicated keyboard key for the forward slash / in the German keyboard layout, and therefore it is impossible to use the Ctrl+/ shortcut to comment the current line. Do you have a non-English keyboard layout?Īll keymaps in IntelliJ IDEA are designed for the QWERTY US English keyboard layout. If you think that the default mapping for a specific shortcut is incorrect for a particular keymap, let us know by filing an issue in our issue tracker. Use the search field to check whether the shortcuts are mapped as expected.Īlternatively, you can select the desired keymap at the top of this documentation page, and check the list of shortcuts to study keyboard mappings in that keymap. Make sure that you are using the correct keymap. Press Ctrl+Alt+S to open the IDE settings and select Keymap. If you worked with a specific editor or IDE before, you can switch to a keymap with the corresponding name, such as Eclipse, NetBeans, Sublime Text, or VSCode, and use the same shortcuts as in that editor or IDE. Taking into account different expectations regarding shortcuts, IntelliJ IDEA lets you choose between keymaps (predefined sets of shortcuts). It may be obvious for shortcuts like Ctrl+C and Ctrl+V, but shortcuts like Alt+Up or Ctrl+W often perform different actions depending on the application and the operating system. 10.Troubleshooting problems with keyboard shortcuts Are you using the right keymap?įirst of all, check whether the shortcut should work as you expect. And if we want our program just to run until it encounters the next breakpoint, then Run – Debugging Actions – Resume Program ( F9) does just that. If we want our program to run to the line where our cursor is, then Run – Debugging Actions – Run to Cursor ( Alt + F9) accomplishes this. That's what Run – Debugging Actions – Step Out ( Shift + F8) does. When debugging, we may want to run our code until the current method is finished. Alternatively, we can dive into the method at the current line with Run – Debugging Actions – Step Into ( F7). So if that line is a method, we'll execute that entire method in one fell swoop. When our code hits a breakpoint during debugging, we can step over the current line with Run – Debugging Actions – Step Over ( F8). We can toggle a breakpoint at the current line with Run – Toggle Breakpoint – Line Breakpoint ( Ctrl + F8 / Cmd + F8). We view the current breakpoints with Run – View Breakpoints ( Ctrl + Shift + F8 / Shift + Cmd + F8). We can still save all files manually with File – Save all ( Ctrl + S / Cmd + S). IntelliJ IDEA automatically saves our code, for instance, before running it. That is Ctrl + Shift + / in Windows and Alt + Cmd + / in macOS. We can even comment out a whole block of code with Code – Comment with Block Comment. We can use Code – Surround with ( Ctrl + Alt + T / Alt + Cmd +T) to put control structures around our code, such as an if statement. And with Code – Generate ( Alt + Insert / Cmd + N), we can create common methods like getters, setters, or toString(). Code – Code Completion – Complete Current Statement ( Ctrl + Shift + Enter / Shift + Cmd + Enter) finishes our current line.Ĭode – Override Methods ( Ctrl + O) lets us pick inherited methods to overwrite. We may need to type a closing parenthesis and have to put a semicolon at the end. This function also automatically launches after a brief delay in the default IntelliJ IDEA configuration. When we start to type the name of variables, methods, or types, IntelliJ IDEA helps us finish those names with Code – Code Completion – Basic ( Ctrl + Space). Once we arrive at the right file and the right place, we can start editing our code.
0 Comments
Leave a Reply. |