Setting HUD content

Hello, I would like to display the first 20 characters of the clipboard after copy (pressing Ctrl-V) in the HUD text. Ist it possible using Javascript or in any other way?