private void releaseKey(int code) {
        keyDown[code] = false;
        if (code < maxKeyCount) {
            String keyName = keyNames[code];
            if (keyName != null) {
                lastKey = keyName;
            }
        }
    }