summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ruby2d/window.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ruby2d/window.rb b/lib/ruby2d/window.rb
index 1d47e7b..73674fb 100644
--- a/lib/ruby2d/window.rb
+++ b/lib/ruby2d/window.rb
@@ -112,6 +112,9 @@ module Ruby2D
def key_callback(key)
key.downcase!
@on_key_proc.call(key)
+ if @keys.has_key? 'any'
+ @keys['any'].call
+ end
if @keys.has_key? key
@keys[key].call
end
@@ -129,6 +132,9 @@ module Ruby2D
def key_down_callback(key)
key.downcase!
+ if @keys_down.has_key? 'any'
+ @keys_down['any'].call
+ end
if @keys_down.has_key? key
@keys_down[key].call
end