This commit is contained in:
Gabriel Salvador 2023-07-03 16:13:38 +01:00 committed by GitHub
commit 055bbb9f15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
285 changed files with 1042 additions and 9 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

2
.gitignore vendored
View File

@ -9,3 +9,5 @@
.buildpath
.classpath
.project
./out/
./target/

3
.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

View File

@ -0,0 +1,9 @@
<component name="ArtifactManager">
<artifact type="jar" name="controlp5:jar">
<output-path>$PROJECT_DIR$/out/artifacts/controlp5_jar</output-path>
<root id="archive" name="controlp5.jar">
<element id="module-output" name="controlp5" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/processing.jar" path-in-jar="/" />
</root>
</artifact>
</component>

13
.idea/compiler.xml Normal file
View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="controlp5" />
</profile>
</annotationProcessing>
</component>
</project>

7
.idea/encodings.xml Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
</component>
</project>

25
.idea/jarRepositories.xml Normal file
View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jitpack.io" />
<option name="name" value="jitpack.io" />
<option name="url" value="https://jitpack.io" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
</component>
</project>

View File

@ -0,0 +1,9 @@
<component name="libraryTable">
<library name="ant-contrib-1.0b3">
<CLASSES>
<root url="jar://$PROJECT_DIR$/resources/code/ant-contrib-1.0b3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@ -0,0 +1,10 @@
<component name="libraryTable">
<library name="antlr.antlr4.runtime" type="repository">
<properties maven-id="org.antlr:antlr4-runtime:4.12.0" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr4-runtime/4.12.0/antlr4-runtime-4.12.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

14
.idea/misc.xml Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_17_PREVIEW" project-jdk-name="temurin-17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

10
.idea/modules.xml Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/resources/addons/addons.iml" filepath="$PROJECT_DIR$/resources/addons/addons.iml" />
<module fileurl="file://$PROJECT_DIR$/examples/examples.iml" filepath="$PROJECT_DIR$/examples/examples.iml" />
<module fileurl="file://$PROJECT_DIR$/resources/resources.iml" filepath="$PROJECT_DIR$/resources/resources.iml" />
</modules>
</component>
</project>

124
.idea/uiDesigner.xml Normal file
View File

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@ -1,3 +1,8 @@
## this is a fork of the original controlP5 library by Andreas Schlegel
## it provides a pom.xml for maven and can be used as a dependency in maven projects
# ControlP5
ControlP5 is a GUI library written by [Andreas Schlegel](http://www.sojamo.de) for the programming environment [Processing](http://www.processing.org).
@ -23,7 +28,7 @@ The range of available controllers includes Slider, Button, Toggle, Knob, Textfi
## <a name"install"></a>Installation
To install the library from inside the Processing IDE, use the Library Manager from the menu under Sketch &rarr; Import Library &rarr; Add Library and search for ControlP5.
To install the library from inside the Processing IDE, use the Library Manager from the menu under sketch.Sketch &rarr; Import Library &rarr; Add Library and search for ControlP5.
If you want to install ControlP5 manually, download (the latest) version from the [releases](https://github.com/sojamo/controlp5/releases) directory. Inside the downloaded .zip file you will find [install_instructions](resources/install_instructions.txt) that guide you through the installation details and tell you where the controlP5 folder needs to be put. In case you are looking for an earlier release, please check the [archive on google code](https://code.google.com/p/controlp5/downloads/list?can=1&q=&colspec=Filename+Summary+Uploaded+ReleaseDate+Size+DownloadCount).

11
examples/examples.iml Normal file
View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/experimental/MidiMapper" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

BIN
lib/.DS_Store vendored Normal file

Binary file not shown.

BIN
lib/processing.jar Normal file

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
javac -cp .:../../../distribution/tmp/controlP5/library/controlP5.jar AddMethodList.java
java -cp .:../../../distribution/tmp/controlP5/library/controlP5.jar:$HOME/Documents/workspace/libs/core.jar AddMethodList $HOME/Documents/workspace/controlp5/examples/controllers/ControlP5accordion/

View File

@ -0,0 +1,123 @@
/**
* ControlP5 MidiMapper
*
* Maps midi input to controlP5 controllers.
* This will eventually result in a library.
*
* by Andreas Schlegel, 2013
* www.sojamo.de/libraries/controlp5
*
*/
import java.util.HashMap;
import java.util.Map;
import controlP5.*;
import javax.sound.midi.Receiver;
import javax.sound.midi.MidiMessage;
ControlP5 cp5;
Map<String, String> midimapper = new HashMap<String, String>();
void setup() {
size( 600, 400 );
cp5 = new ControlP5( this );
cp5.begin(cp5.addTab("a"));
cp5.addSlider("a-1").setPosition(20, 120).setSize(200, 20);
cp5.addSlider("a-2").setPosition(20, 160).setSize(200, 20);
cp5.addSlider("a-3").setPosition(20, 200).setSize(200, 20);
cp5.addToggle("a-4").setPosition(280, 120).setSize(100, 20);
cp5.addButton("a-5").setPosition(280, 160).setSize(100, 20);
cp5.addBang("a-6").setPosition(280, 200).setSize(100, 20);
cp5.end();
cp5.begin(cp5.addTab("b"));
cp5.addSlider("b-1").setPosition(20, 120).setSize(200, 20);
cp5.addSlider("b-2").setPosition(20, 160).setSize(200, 20);
cp5.addSlider("b-3").setPosition(20, 200).setSize(200, 20);
cp5.end();
final String device = "SLIDER/KNOB";
//midimapper.clear();
midimapper.put( ref( device, 0 ), "a-1" );
midimapper.put( ref( device, 1 ), "a-2" );
midimapper.put( ref( device, 2 ), "a-3" );
midimapper.put( ref( device, 32 ), "a-4" );
midimapper.put( ref( device, 48 ), "a-5" );
midimapper.put( ref( device, 64 ), "a-6" );
midimapper.put( ref( device, 16 ), "b-1" );
midimapper.put( ref( device, 17 ), "b-2" );
midimapper.put( ref( device, 18 ), "b-3" );
boolean DEBUG = false;
if (DEBUG) {
new MidiSimple( device );
}
else {
new MidiSimple( device , new Receiver() {
@Override public void send( MidiMessage msg, long timeStamp ) {
byte[] b = msg.getMessage();
if ( b[ 0 ] != -48 ) {
Object index = ( midimapper.get( ref( device , b[ 1 ] ) ) );
if ( index != null ) {
Controller c = cp5.getController(index.toString());
if (c instanceof Slider ) {
float min = c.getMin();
float max = c.getMax();
c.setValue(map(b[ 2 ], 0, 127, min, max) );
} else if ( c instanceof Button ) {
if ( b[ 2 ] > 0 ) {
c.setValue( c.getValue( ) );
c.setColorBackground( 0xff08a2cf );
} else {
c.setColorBackground( 0xff003652 );
}
} else if ( c instanceof Bang ) {
if ( b[ 2 ] > 0 ) {
c.setValue( c.getValue( ) );
c.setColorForeground( 0xff08a2cf );
} else {
c.setColorForeground( 0xff00698c );
}
} else if ( c instanceof Toggle ) {
if ( b[ 2 ] > 0 ) {
( ( Toggle ) c ).toggle( );
}
}
}
}
}
@Override public void close( ) {
}
}
);
}
}
String ref(String theDevice, int theIndex) {
return theDevice+"-"+theIndex;
}
void draw() {
background( 0 );
}

Binary file not shown.

View File

@ -0,0 +1,18 @@
# a shell script to create a java documentation
# for a processing library.
#
# make changes to the variables below so they
# fit the structure of your library
# the package name of your library
package=template;
# source folder location
src=../src;
# the destination folder of your documentation
dest=../documentation;
# compile the java documentation
javadoc -d $dest -stylesheetfile ./stylesheet.css -sourcepath ${src} ${package}

70
pom.xml Normal file
View File

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.gabrielsalvador</groupId>
<artifactId>controlp5</artifactId>
<version>2.2.6</version>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<antlr4.version>4.12.0</antlr4.version> <!-- Use the latest ANTLR version as of your current date -->
</properties>
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.micycle1</groupId>
<artifactId>processing-core-4</artifactId>
<version>4.2</version>
</dependency>
<!-- ANTLR4 runtime -->
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<version>${antlr4.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<!-- ANTLR4 Maven plugin -->
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr4-maven-plugin</artifactId>
<version>${antlr4.version}</version>
<executions>
<execution>
<goals>
<goal>antlr4</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/AddMethodList" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="controlp5" />
</component>
</module>

11
resources/resources.iml Normal file
View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/code" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

BIN
src/.DS_Store vendored Normal file

Binary file not shown.

BIN
src/main/.DS_Store vendored Normal file

Binary file not shown.

BIN
src/main/java/.DS_Store vendored Normal file

Binary file not shown.

BIN
src/main/java/controlP5/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -840,12 +840,12 @@ public final class ControlWindow {
public ControlWindow setUndecorated( boolean theFlag ) {
if ( theFlag != isUndecorated( ) ) {
isUndecorated = theFlag;
_myApplet.frame.removeNotify( );
_myApplet.frame.setUndecorated( isUndecorated );
//_myApplet.frame.removeNotify( );
//_myApplet.frame.setUndecorated( isUndecorated );
_myApplet.setSize( _myApplet.width , _myApplet.height );
_myApplet.setBounds( 0 , 0 , _myApplet.width , _myApplet.height );
_myApplet.frame.setSize( _myApplet.width , _myApplet.height );
_myApplet.frame.addNotify( );
//_myApplet.setBounds( 0 , 0 , _myApplet.width , _myApplet.height );
//_myApplet.frame.setSize( _myApplet.width , _myApplet.height );
//_myApplet.frame.addNotify( );
}
return this;
}
@ -859,7 +859,7 @@ public final class ControlWindow {
}
public ControlWindow setLocation( int theX , int theY ) {
_myApplet.frame.setLocation( theX , theY );
//_myApplet.frame.setLocation( theX , theY );
return this;
}

View File

@ -87,6 +87,7 @@ class ControllerLayout {
oos.flush( );
oos.close( );
fos.close( );
} catch ( Exception e ) {
logger.warning( "Exception during serialization: " + e );
}

View File

@ -0,0 +1,26 @@
package controlP5;
import processing.event.KeyEvent;
public class MultilineTextfield extends Textfield {
public MultilineTextfield(ControlP5 theControlP5, String theName) {
super(theControlP5, theName);
}
@Override
public void keyEvent(KeyEvent theKeyEvent) {
if (isUserInteraction && isTexfieldActive && isActive && theKeyEvent.getAction() == KeyEvent.PRESS) {
if (ignorelist.contains(cp5.getKeyCode())) {
return;
}
if (cp5.getKeyCode() == ENTER) {
// Append a new line character to the text buffer
_myTextBuffer.insert(_myTextBufferIndex, '\n');
setIndex(_myTextBufferIndex + 1);
} else {
super.keyEvent(theKeyEvent);
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More