The right direction for you would be some general books on computer
programming, where you will learn that in the several thousand of terse,
single-spaced pages that make up the current C++ standard, there is no
mention whatsoever about "highlighting" text, in some mysterious fashion, or
equally-mysterious "hotkeys", that do wondrous things.
This is purely a function of your operating system, and the exact task for
implementing these kinds of things depend entirely on the operating system
being used.
Since you don't even realize that this is an operating system-specific
question, and you didn't specify which OS you're using, I think it would be
rather difficult, if not impossible, for you to implement the task at hand
right now; but maybe several years down the road.
It just so happens that last week I finished implementing copy/cut/paste
support in my X toolkit library (shameless plug:
https://www.libcxx.org/w/copycutpastemenu.html). I don't remember exactly
when I started it, but I've been working on this library for the last eight
years, and coding C++ for …much longer than that. Just to give you a rough
idea how complicated C++-related things are, in the real world.
The only other thing I can tell you with some level of confidence is that,
whatever operating system you're using, it's unlikely that you will be able
to modify its default copy/cut/paste behavior in the manner you desire. All
traditional OSrd implement copy/cut/paste internally, behind the scenes, and
their exact mechanics are not exposed to applications. The mouse pointer
operations and/or the keyboard shortcuts for copy/cut/pasting text get
processed entirely by the operating system, or the GUI library being used on
your operating system. The application does not even realize that this is
happening. The OS/GUI library handles the mechanics of this process entirely
on its own. All that the application does is put up text input fields, where
text gets typed in when that text input field has keyboard focus, and the OS
or the GUI library handles copy/cut/paste operations on its own. All the
application cares about is text that mysterious appears in its
aforementioned text input fields, and how it got there, it doesn't really
care.
Some OSes might offer third-party add-on tools that enhance the existing
copy/cut/paste behavior. Those tools typically use highly OS-specific
internal functions to modify its copy/cut/paste behavior.