mirror of
https://github.com/sojamo/controlp5
synced 2024-11-25 15:17: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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( theKeyEvent.getAction( ) == KeyEvent.TYPE ) {
|
||||||
|
keys[ theKeyEvent.getKeyCode( ) ] = true;
|
||||||
|
numOfActiveKeys++;
|
||||||
|
cp5.modifiers = theKeyEvent.getModifiers( );
|
||||||
|
key = theKeyEvent.getKey( );
|
||||||
|
}
|
||||||
|
|
||||||
if ( theKeyEvent.getAction( ) == KeyEvent.PRESS ) {
|
if ( theKeyEvent.getAction( ) == KeyEvent.PRESS ) {
|
||||||
keys[ theKeyEvent.getKeyCode( ) ] = true;
|
keys[ theKeyEvent.getKeyCode( ) ] = true;
|
||||||
numOfActiveKeys++;
|
numOfActiveKeys++;
|
||||||
@ -475,6 +482,7 @@ public final class ControlWindow {
|
|||||||
keys[ theKeyEvent.getKeyCode( ) ] = false;
|
keys[ theKeyEvent.getKeyCode( ) ] = false;
|
||||||
numOfActiveKeys--;
|
numOfActiveKeys--;
|
||||||
cp5.modifiers = theKeyEvent.getModifiers( );
|
cp5.modifiers = theKeyEvent.getModifiers( );
|
||||||
|
keyCode = theKeyEvent.getKeyCode( );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( theKeyEvent.getAction( ) == KeyEvent.PRESS && cp5.isShortcuts( ) ) {
|
if ( theKeyEvent.getAction( ) == KeyEvent.PRESS && cp5.isShortcuts( ) ) {
|
||||||
|
@ -357,15 +357,25 @@ public class Textfield extends Controller< Textfield > {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void keyEvent( KeyEvent theKeyEvent ) {
|
public void keyEvent( KeyEvent theKeyEvent ) {
|
||||||
if ( isUserInteraction && isTexfieldActive && isActive && theKeyEvent.getAction( ) == KeyEvent.PRESS ) {
|
if ( isUserInteraction && isTexfieldActive && isActive) {
|
||||||
if ( ignorelist.contains( cp5.getKeyCode( ) ) ) {
|
if(theKeyEvent.getAction( ) == KeyEvent.TYPE) {
|
||||||
return;
|
if ( ignorelist.contains( cp5.getKeyCode( ) ) ) {
|
||||||
}
|
return;
|
||||||
if ( keyMapping.containsKey( cp5.getKeyCode( ) ) ) {
|
}
|
||||||
keyMapping.get( cp5.getKeyCode( ) ).execute( );
|
if ( keyMapping.containsKey( cp5.getKeyCode( ) ) ) {
|
||||||
} else {
|
return;
|
||||||
|
}
|
||||||
keyMapping.get( DEFAULT ).execute( );
|
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( );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -473,4 +483,4 @@ public class Textfield extends Controller< Textfield > {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user