public boolean isPressedOnce(int key) {
        if (this.keys.containsKey(key) && this.keys.get(key)) {
            if (!this.pressed.containsKey(key) || !this.pressed.get(key)) {
                this.pressed.put(key, true);
                return true;
            }
        }
        return false;
    }