More efficient handling of keyboard settings