I'm having trouble capturing the <tab> keystroke in my Java command-line application. Using System.in.read() I don't seem to get anything when hitting the tab key. What is the best way to approach this?
To give some context, I'm trying to allow a user to hit the tab key mid-command to have it autocomplete the command (much like you might do in a bash shell). I'm open to suggestions if there are better approaches to achieving this (perhaps using System.in.read() isn't the best angle to approach this?).