Connecting ONLY the screen keyboard to a JTextComponent

28 views Asked by At

I've connected Vladimir Petrenko's screen keyboard (1.0) to my apps JTextComponent and it works well. Alas, the hardware keyboard continues to provide input characters and I'd like to have the ONLY input come from the screen keyboard.

Petrenko's keyboard inputs text via the JTextComponent setText(..), set CaretPosition() methods. If the JTextComponent is disabled (setEnabled(false)) the text appears during screen keyboard typing and no hardware input is accepted, but the cursor and editing capability disappear.

How can I "disable" the input from the hardware keyboard and retain the cursor and editing ability?

Thanks,

Chris Kimball

1

There are 1 answers

0
user3594510 On

setKeymap(null) on the JTextComponent disabled most keys.