mirror of
https://github.com/sojamo/controlp5
synced 2024-11-22 05:57:57 +01:00
Typing characters with accent marks in a textbox #38
This commit is contained in:
parent
d3dad67633
commit
e4d5e0160a
@ -463,6 +463,13 @@ public final class ControlWindow {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( theKeyEvent.getAction( ) == KeyEvent.TYPE ) {
|
||||
keys[ theKeyEvent.getKeyCode( ) ] = true;
|
||||
numOfActiveKeys++;
|
||||
cp5.modifiers = theKeyEvent.getModifiers( );
|
||||
key = theKeyEvent.getKey( );
|
||||
}
|
||||
|
||||
if ( theKeyEvent.getAction( ) == KeyEvent.PRESS ) {
|
||||
keys[ theKeyEvent.getKeyCode( ) ] = true;
|
||||
numOfActiveKeys++;
|
||||
@ -475,6 +482,7 @@ public final class ControlWindow {
|
||||
keys[ theKeyEvent.getKeyCode( ) ] = false;
|
||||
numOfActiveKeys--;
|
||||
cp5.modifiers = theKeyEvent.getModifiers( );
|
||||
keyCode = theKeyEvent.getKeyCode( );
|
||||
}
|
||||
|
||||
if ( theKeyEvent.getAction( ) == KeyEvent.PRESS && cp5.isShortcuts( ) ) {
|
||||
|
@ -357,15 +357,25 @@ public class Textfield extends Controller< Textfield > {
|
||||
}
|
||||
|
||||
public void keyEvent( KeyEvent theKeyEvent ) {
|
||||
if ( isUserInteraction && isTexfieldActive && isActive && theKeyEvent.getAction( ) == KeyEvent.PRESS ) {
|
||||
if ( ignorelist.contains( cp5.getKeyCode( ) ) ) {
|
||||
return;
|
||||
}
|
||||
if ( keyMapping.containsKey( cp5.getKeyCode( ) ) ) {
|
||||
keyMapping.get( cp5.getKeyCode( ) ).execute( );
|
||||
} else {
|
||||
if ( isUserInteraction && isTexfieldActive && isActive) {
|
||||
if(theKeyEvent.getAction( ) == KeyEvent.TYPE) {
|
||||
if ( ignorelist.contains( cp5.getKeyCode( ) ) ) {
|
||||
return;
|
||||
}
|
||||
if ( keyMapping.containsKey( cp5.getKeyCode( ) ) ) {
|
||||
return;
|
||||
}
|
||||
keyMapping.get( DEFAULT ).execute( );
|
||||
}
|
||||
|
||||
if( theKeyEvent.getAction( ) == KeyEvent.PRESS ) {
|
||||
if ( ignorelist.contains( cp5.getKeyCode( ) ) ) {
|
||||
return;
|
||||
}
|
||||
if ( keyMapping.containsKey( cp5.getKeyCode( ) ) ) {
|
||||
keyMapping.get( cp5.getKeyCode( ) ).execute( );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user