karelzak/util-linux — pull request #5 by maandree (2012-04-09 20:39:04+00:00)
Title: agetty patch

I have patched agetty:

This commit fixes the issue where arrow keys move the cursor out from the text field when entering user name.
It has a queue, 'bp', with all text before the cursor and a stack, 'ap', with all text after the text.
Home, end, left arrow, right arrow, backspace and delete as implemented, and escape sequences should not cause any problem; up and down arrows will be ignored. NUL input is ignored, as it is an issue on some computers, my laptop for example.
Text is input in override mode, meaning that if the cursor is in the middle of the text the character the cursor is on is overridden by new characters.