Module: FFI::NCurses::KeyDefs::KeyHelper

Included in:
FFI::NCurses::KeyDefs, FFI::NCurses::KeyDefs
Defined in:
lib/ffi-ncurses/keydefs.rb

Overview

Maximum key value is 0633 [SOH: sic in ncurses.h]

Instance Method Summary collapse

Instance Method Details

#KEY_CTRL(letter) ⇒ Object

1.8.x



113
114
115
# File 'lib/ffi-ncurses/keydefs.rb', line 113

def KEY_CTRL(letter)
  (letter.ord & ~0b0100000) - ?A.ord + 1
end

#KEY_F(n) ⇒ Object

Value of function key n



124
125
126
# File 'lib/ffi-ncurses/keydefs.rb', line 124

def KEY_F(n)
  KEY_F0 + n
end