private void handleButton(int button, Map<Integer, List<Action>> map, List<Action> list) {
		// execute actions registered for pressed AND released events
		for (Action action : list) {
			action.execute();
		}

		// execute actions handled for pressed OR released events
		List<Action> actions = map.get(button);
		if (actions == null) {
			return;
		}

		for (Action action : actions) {
			action.execute();
		}
	}