mabe02/lanterna

Is there a way to capture ctrl+enter or ctrl+backspace?

panicz opened this issue · 2 comments

panicz commented

When I receive a KeyStoke by invoking the readInput method with the ctrl key pressed, and I press a regular character, I get something that is printed as KeyStroke{keytype=Character, character='e', modifiers=[ctrl]}, and for which the isCtrlPressed method returns true.

However, when I press enter, the keystroke object is printed as KeyStroke{keytype=Enter, character='\n'}, and the isCtrlPressed method returns false regardless of the actual state of the ctrl button.

So I'd like to know if there's any way to obtain the state of modifier buttons for objects whose keytype is different than Character?

avl42 commented
panicz commented

Thanks for clarification!