Java 9:Building Robust Modular Applications
上QQ阅读APP看书,第一时间看更新

Modifying text

The default text edit/entry mode is that the text you type will appear at the current cursor position. You have several options available to you when you want to delete text. Here is a complete list:

Delete action PC keyboard combination Mac keyboard combination
Delete the character at the current cursor location Delete Delete
Delete the character to the left of the cursor Backspace Backspace
Delete the text from the cursor location to the end of the line Ctrl + K Cmd + K
Delete the text from the cursor location to the end of the current word Alt + D Alt/Opt + D
Delete from the cursor location to the previous white space Ctrl + W Cmd + W
Paste the most recently deleted text at the cursor location Ctrl + Y Cmd + Y
When the Ctrl + Y (or Cmd + Y on Mac) is used, you will be able to use the Alt + Y keyboard combination to cycle through previously deleted text Alt + Y Alt/Opt + Y