Configure upcased key as combination with shift mod

This commit is contained in:
Thibault Jouan
2015-04-15 01:09:18 +00:00
parent 56197c85f8
commit 9c9aa1dabb
7 changed files with 63 additions and 9 deletions

View File

@@ -32,7 +32,11 @@ module Uh
private
def translate_keysym keysym
KEYSYM_TRANSLATIONS.key?(keysym) ? KEYSYM_TRANSLATIONS[keysym] : keysym
translate_key = keysym.to_s.downcase.to_sym
translated_keysym = KEYSYM_TRANSLATIONS.key?(translate_key) ?
KEYSYM_TRANSLATIONS[translate_key] :
translate_key
keysym =~ /[A-Z]/ ? [translated_keysym, :shift] : translated_keysym
end
end
end