Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Translate keyboard key to keyboard combination

Tags:

java

keyboard

Is there any way to achieve this?

I have a character, say "/" and I want to get the keyboard combination for this.

For the German layout, "/" would be Shift+7.

like image 668
matthias Avatar asked Jun 17 '14 08:06

matthias


1 Answers

If I understand you correctly, you want to know what key combination is necessary to generate a specific character. The closest I have come to this is this bit of code: KeyboardLayout. It uses the keyboard layouts on Wikipedia to build a map of key codes for each language.

like image 99
mikea Avatar answered Oct 11 '22 14:10

mikea