%
``<#2684#> selection<#2684#>'' is the cut and paste facility for the \ text
consoles. The mechanism is mainly handled by a user-level process,
which can be instantiated by either <#2685#> selection<#2685#> or <#2686#> gpm<#2686#>.
The user-level program uses <#2687#> ioctl()<#2687#> on the console to tell the kernel to
highlight a region of the screen. The selected text, then, is copied
to a selection buffer. The buffer is a static entity in <#2688#>
console.c<#2688#>. Pasting text is accomplished by `manually' pushing
characters in the tty input queue. The whole selection mechanism is
protected by <#2689#> #ifdef<#2689#> so users can disable it during kernel
configuration to save a few kilobytes of RAM.
Selection is a very-low-level facility, and its workings are hidden
from any other kernel activity. This means that most <#2690#> #ifdef<#2690#>'s
simply deals with removing the highlight before the screen is modified
in any way.
#tex2html_wrap2974#