This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

KeyListener with Control key  RSS feed

 
Jack Lord
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm trying to create a text input field with keyboard shortcuts to write non-standard characters: 'a' adds an a, 'ctrl+a' adds an a with an accent, 'alt+a' and 'ctrl+alt+a' add different accents etc. This works fine for the alt modifier but I get no response from the control key, or I press 'ctrl + a' and it selects the whole text. I'm guessing that the control key gets monopolised by some other component but I don't know how to disable it. I'm sure I've seen a post title on this very topic either here or elsewhere but I can't find it now. Thanks for any help!
Jack

My code:
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let's move this to the Swing/AWT forum.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!