from typing import Dict
from typing import Set


def _getKeyNames(keys: int, names: Dict[int, str]) -> Set[str]:
	"""Converts a bitset of hardware buttons and keys to their equivalent names"""
	return {keyName for bitFlag, keyName in names.items() if bitFlag & keys}