There is some site.
There is a text on that site.
To get selected text we need the document object and the getSelection method.
The getSelection method returns a Selection object.
We need toString method of the Selection object to get the selected text.
To check the Ctrl + Enter combination is pressed we need to add an event listener
and to test key and ctrlKey properties of the event object.
Let’s open the site, select a text part and press ctrl enter.
We have got the selected text.