Example usage for java.awt Event KEY_RELEASE

List of usage examples for java.awt Event KEY_RELEASE

Introduction

In this page you can find the example usage for java.awt Event KEY_RELEASE.

Prototype

int KEY_RELEASE

To view the source code for java.awt Event KEY_RELEASE.

Click Source Link

Document

The user has released a normal key.

Usage

From source file:EventTester.java

public boolean keyUp(Event e, int key) {
    int flags = e.modifiers;
    if (e.id == Event.KEY_RELEASE) // a regular key
        showLine("Key Up: " + mods(flags) + key_name(e));
    else if (e.id == Event.KEY_ACTION_RELEASE) // a function key
        showLine("Function Key Up: " + mods(flags) + function_key_name(key));
    return true;//from   w  w w  .  j ava  2s . c  o  m
}