# Undefined method \`register\_hot\_key' for Wx::Window

**URL:** <https://www.ruby-forum.com/t/undefined-method-register-hot-key-for-wx-window/197475>\
**Category:** wxRuby\
**Created:** [October 15, 2010, 12:32am UTC](https://www.ruby-forum.com/t/undefined-method-register-hot-key-for-wx-window/197475 "2010-10-15T00:32:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![okkezSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/85f322/32.png) [@okkezSS](https://www.ruby-forum.com/u/okkezSS)\
**Post date:** [October 15, 2010, 12:32am UTC](https://www.ruby-forum.com/t/undefined-method-register-hot-key-for-wx-window/197475/1 "2010-10-15T00:32:47Z")

</div>

Hi,

I am trying to register a global hotkey using wxruby on Windows XP  
SP3. The documentation at  
[http://wxruby.rubyforge.org/doc/window.html#Window\_registerhotkey](http://wxruby.rubyforge.org/doc/window.html#Window_registerhotkey) says  
that register\_hot\_key is available (although I don’t quite understand  
the comment there about Windows CE).

Anyway, here is the smallest piece of code I could come up with for  
reproducing the problem:

require ‘wx’  
frame = Wx::Frame.new  
frame.register\_hot\_key(100, Wx::MOD\_ALT, Wx::K\_F1)

=\> NoMethodError: undefined method `register\_hot\_key’ for  
#Wx::Frame:0x38bfd70

Wx::Frame inherits from Wx::Window, so I would expect that method to be  
there.

Any ideas on why this doesn not work? Am I doing something wrong?

I am using wxruby (2.0.1 x86-mingw32).

Fine regards

Nicholas
