From: Caleb Clausen Date: 2010-07-13T02:41:14+09:00 Subject: Re: How to create keybinds? On 7/12/10, Erik Lindstahl wrote: > My Rubyknowledge is somewhat limited, so im in need of some help with > the following dilemma.. > is there a way to create keybinds in ruby? In plain english, I want to > be able to press f2 and run a rubyscript, how would I go about doing > that? We need some more information to be able to help you. What environment or windowing toolkit are you working in? It's certainly possible to create, say, a win32 program in ruby which (when it is in the foreground) responds to f2 by running a piece of ruby code. So, are you looking at writing a win32 program? tk? macos? gtk? What operating system are you using? If you want to have a global mode keybinding that works no matter what program is in the foreground, you should try out AutoHotKey if you're on windows. On other operating systems, I'm not sure what the equivalent would be, but there's probably a way.