Skip to content

feat: add keyboard event #148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 11, 2017

Conversation

hawkingrei
Copy link
Contributor

@hawkingrei hawkingrei commented Jul 10, 2017

Hi ~
I add keyboard event, you can test it by the following code.

settings <- function() {
    size(500, 500)
}

draw <- function() {
   stdout$print(key)
   #stdout$print(keyCode)
   stdout$print("\n")
}

Copy link
Member

@gaocegege gaocegege left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work!

@@ -32,6 +32,8 @@ public BuiltinApplet() {
Session session =
new SessionBuilder().withDefaultPackages().setPackageLoader(packageLoader).build();
this.renjinEngine = new RenjinScriptEngineFactory().getScriptEngine(session);
this.renjinEngine.put("key", "0");
this.renjinEngine.put("keyCode", 0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hawkingrei
Copy link
Contributor Author

fix it

@gaocegege
Copy link
Member

LGTM

@gaocegege gaocegege merged commit 917bebc into processing-r:master Jul 11, 2017
@hawkingrei hawkingrei deleted the feat/add_keyboard_event branch July 11, 2017 03:12
@gaocegege gaocegege modified the milestone: Evaluation 2 Jul 12, 2017
@jeremydouglass
Copy link
Member

I have been trying to understand whether or not the input function mappings in this commit (keyPressed, mouseClicked, etc.) are implemented, and if so how to use them.

Is there a way to use keyPressed or keyPressed() in Processing.R based on this commit?

@gaocegege
Copy link
Member

I am afraid not because of #170

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants