class Reline::Windows::KeyEventRecord
def initialize(virtual_key_code, char_code, control_key_state)
def initialize(virtual_key_code, char_code, control_key_state) @virtual_key_code = virtual_key_code @char_code = char_code @control_key_state = control_key_state @enhanced = control_key_state & ENHANCED_KEY != 0 (@control_keys = []).tap do |control_keys| # symbols must be sorted to make comparison is easier later on control_keys << :ALT if control_key_state & (LEFT_ALT_PRESSED | RIGHT_ALT_PRESSED) != 0 control_keys << :CTRL if control_key_state & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED) != 0 control_keys << :SHIFT if control_key_state & SHIFT_PRESSED != 0 end.freeze end