- Swaps the behavior of
Shift+Enter
andEnter
key combinations globally.- Pressing
Shift+Enter
acts like pressingEnter
. - Pressing
Enter
acts like pressingShift+Enter
(typically inserting a newline).
- Pressing
- Works within:
- Textareas (
<textarea>
) - Input fields (
<input>
) - Note:Shift+Enter
often has no default behavior here, so pressingEnter
might not do anything visibly different. - Contenteditable elements (
<div contenteditable="true">
, etc.)
- Textareas (
- Download the extension files (including
manifest.json
,content/content.js
,popup/popup.html
,popup/popup.js
, and theicons
folder). - Open your Chrome browser and go to
chrome://extensions
. - Enable "Developer mode" using the toggle switch (usually in the top right corner).
- Click the "Load unpacked" button.
- Select the directory containing the downloaded extension files (the
shiftEnter
directory). - The extension should now be active.
- This extension intercepts keydown events early (capture phase) and prevents default behavior to simulate the swapped key combination.
- For
Enter
->Shift+Enter
, it manually inserts a newline character in textareas and contenteditable elements to ensure consistent behavior, as simply dispatching theShift+Enter
event might not always produce a newline depending on the specific website's implementation.