summaryrefslogtreecommitdiff
path: root/tests/ruby/xkbparser.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ruby/xkbparser.rb')
-rw-r--r--tests/ruby/xkbparser.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ruby/xkbparser.rb b/tests/ruby/xkbparser.rb
index cc67c44..4b15df3 100644
--- a/tests/ruby/xkbparser.rb
+++ b/tests/ruby/xkbparser.rb
@@ -6,6 +6,8 @@
# complex XKB format
#
+require "utils.rb"
+
class Symbols < Hash
#
@@ -68,6 +70,11 @@ class Symbols < Hash
end
end
+ # Size of all keys
+ def length()
+ keys().length()
+ end
+
#
# Size - takes into account overlapping key definitions
#
@@ -138,6 +145,16 @@ class SymbolsList < Hash
matching
end
+ def merge()
+ everything = NonuniqueCountingHash.new
+ find_all do | symsName, syms |
+ syms.find_all do | symName, keycode |
+ everything[symName] = keycode
+ end
+ end
+ everything
+ end
+
end
class Parser