Java Code Examples for com.jogamp.newt.event.KeyEvent#VK_ESCAPE

The following examples show how to use com.jogamp.newt.event.KeyEvent#VK_ESCAPE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HelloTriangle.java    From CPE552-Java with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void keyPressed(KeyEvent e) {
    if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
        new Thread(() -> {
            window.destroy();
        }).start();
    }
}
 
Example 2
Source File: HelloGlobe.java    From CPE552-Java with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void keyPressed(KeyEvent e) {
    if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
        new Thread(() -> {
            window.destroy();
        }).start();
    }
}
 
Example 3
Source File: HelloTriangle.java    From hello-triangle with MIT License 5 votes vote down vote up
@Override
public void keyPressed(KeyEvent e) {
    if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
        new Thread(() -> {
            window.destroy();
        }).start();
    }
}
 
Example 4
Source File: HelloGlobe.java    From hello-triangle with MIT License 5 votes vote down vote up
@Override
public void keyPressed(KeyEvent e) {
    if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
        new Thread(() -> {
            window.destroy();
        }).start();
    }
}
 
Example 5
Source File: HelloTriangle.java    From hello-triangle with MIT License 5 votes vote down vote up
@Override
public void keyPressed(KeyEvent e) {
    if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
        new Thread(() -> {
            window.destroy();
        }).start();
    }
}
 
Example 6
Source File: HelloTexture.java    From hello-triangle with MIT License 5 votes vote down vote up
@Override
public void keyPressed(KeyEvent e) {
    if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
        new Thread(() -> {
            window.destroy();
        }).start();
    }
}
 
Example 7
Source File: HelloTriangleSimple.java    From hello-triangle with MIT License 5 votes vote down vote up
@Override
public void keyPressed(KeyEvent e) {
    if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
        new Thread(() -> {
            window.destroy();
        }).start();
    }
}
 
Example 8
Source File: Test.java    From jogl-samples with MIT License 5 votes vote down vote up
@Override
public void keyReleased(KeyEvent e) {

    switch (e.getKeyCode()) {
        case KeyEvent.VK_ESCAPE:
            animator.stop();
            glWindow.destroy();
            break;
    }
}