InfoConnect API Guide
Attachmate.Reflection.Emulation.Common Namespace / KeyboardMapper Class / AddMapping Method
A mapping between a key sequence and a set of actions to perform when that key sequence is pressed in a host session.
Example


In This Topic
    AddMapping Method (KeyboardMapper)
    In This Topic
    Adds a key mapping to the current keyboard map.
    Syntax
    'Declaration
     
    
    Public Sub AddMapping( _
       ByVal mapping As KeyboardMapping _
    ) 
    'Usage
     
    
    Dim instance As KeyboardMapper
    Dim mapping As KeyboardMapping
     
    instance.AddMapping(mapping)
    public void AddMapping( 
       KeyboardMapping mapping
    )

    Parameters

    mapping
    A mapping between a key sequence and a set of actions to perform when that key sequence is pressed in a host session.
    Remarks
    A key can also be remapped to do nothing if the InputMapActionSequence specified in mapping.Mapping has no InputMapActions added to it.
    Example
    private IUtsTerminal terminal;
    private IKeyboardMapper mapper;
                
    public void AddMap(KeyboardMapping map)
    {
       if(terminal != null)
       {
          mapper = terminal.KeyboardMapper;
          mapper.AddMapping(KeyboardMapping map);
       }
       else
          Console.Writeline("No terminal exists.");
    }
    See Also