Unless you want the OS to spy on the keyboard this is near-impossible to pull off. And even then it's very hard to do well (backspace, tab auto-completion of paths, copy+paste, etc).
I wasn't saying that to suggest a practical use of this "bug", just to point out that if it were as intentional as the above commend suggested then it should have been expanded to other methods of listing the file directory like typing it in.