lib/vigilem/win32_api/rubyized.rb
# Translates (maps) a virtual-key code into a scan code or character 
# value, or translates a scan code into a virtual-key code. 
# @param  [Integer] code, the uCode
# @param  [Symbol || Integer] conversion, the uMapType, Vigilem::Win32API::Constants::MapType
# @raise  ArgumentError when conversion is a Symbol and not a valid uMapType name
# @raise  ArgumentError when conversion is a Integer and not a valid uMapType code
# @return [Integer] 
Translates (maps) a virtual-key code into a scan code or character
value, or translates a scan code into a virtual-key code.
Translates ( maps ) a virtual - key code into a scan code or character value or translates a scan code into a virtual - key code .
def map_virtual_key(code, conversion)
      conversion_value = if conversion.is_a? Symbol
        raise ArgumentError, "`#{conversion}' is not an available uMapType name" unless MapType.constants.include? conversion
        API::Rubyized.const_get(conversion)
      elsif not (@uMapeTypes ||= MapType.constants.map {|const| Vigilem::Win32API::Rubyized.const_get(const) }).include? conversion
        raise ArgumentError, "`#{conversion}' is not an available uMapType" 
      end
      win32_api_rubyized_src.MapVirtualKey(code, conversion_value || conversion)
    end
def map_virtual_key ( code , conversion ) conversion_value = if conversion . is_a? Symbol raise ArgumentError , "`#{conversion}' is not an available uMapType name" unless MapType . constants . include? conversion API :: Rubyized . const_get ( conversion ) elsif not ( @uMapeTypes ||= MapType . constants . map { | const | Vigilem :: Win32API :: Rubyized . const_get ( const ) } ) . include? conversion raise ArgumentError , "`#{conversion}' is not an available uMapType" end win32_api_rubyized_src . MapVirtualKey ( code , conversion_value || conversion ) end
Translates (maps) a virtual-key code into a scan code or character
value, or translates a scan code into a virtual-key code.
Translates ( maps ) a virtual - key code into a scan code or character value or translates a scan code into a virtual - key code .
None
Integer
ArgumentError when conversion is a Symbol and not a valid uMapType name
ArgumentError when conversion is a Symbol and not a valid uMapType name
ArgumentError when conversion is a Integer and not a valid uMapType code
ArgumentError when conversion is a Integer and not a valid uMapType code
code
conversion
conversion, the uMapType, Vigilem::Win32API::Constants::MapType
conversion the uMapType Vigilem :: Win32API :: Constants :: MapType