public void changeKeybinding(int key, byte type, int action) {
        if (type != 0) {
            keylayout.Layout().put(Integer.valueOf(key), new Pair<>(type, action));
        } else {
            keylayout.Layout().remove(Integer.valueOf(key));
        }
    }