From: Michael Fellinger Date: 2008-11-10T08:31:04+09:00 Subject: Re: Roguelike project? On Mon, Nov 10, 2008 at 4:57 AM, Nit Khair wrote: > Nit Khair wrote: >> Michael Fellinger wrote: >>> On Mon, Nov 10, 2008 at 12:16 AM, Nit Khair >>> wrote: > >>> Hope this helps: >>> http://p.ramaze.net/10515 >>> > manver, > I have got the above sample working (after making some corrections. e.g. > let is not a method is was map. and map should be key. > Not sure if my corrections are correct, they are based on vi.rb. Pull from the repo, there have been major changes and improvments to VER. > The sample prints all keys, including Esc combinations, but does not use > C-c as a control, although the mapping is there. > > key :esc, :into_control_mode > key 'C-c', :into_control_mode # esc is slow due to timeout > > I also did this: > > VER.map :control do > key 'C-q', :stop > key 'q', :stop > key 'r', :close > end > > I assumed that under C-c I could press C-q or q or r. But these are not > mapped to C-c or Esc. > Any tips on what to do for C-c would be great. > > Thanks a lot. > p.s. I have attached the file I modified from the link you gave me as > test.rb. > > Attachments: > http://www.ruby-forum.com/attachment/2909/test.rb > > -- > Posted via http://www.ruby-forum.com/. > >