public void OnSelectionFixed()
        {
            //if (WindowManagerPlugin.Instance.WindowPreference.OriginalPreference.AutoCopyByLeftButton) {
            ICommandTarget ct = (ICommandTarget)this.GetAdapter(typeof(ICommandTarget));

            if (ct != null)
            {
                CommandManagerPlugin cm = CommandManagerPlugin.Instance;
                if (Control.ModifierKeys == Keys.Shift)       //CopyAsLook
                //Debug.WriteLine("CopyAsLook");
                {
                    cm.Execute(cm.Find("org.poderosa.terminalemulator.copyaslook"), ct);
                }
                else
                {
                    //Debug.WriteLine("NormalCopy");
                    IGeneralViewCommands gv = (IGeneralViewCommands)GetAdapter(typeof(IGeneralViewCommands));
                    if (gv != null)
                    {
                        cm.Execute(gv.Copy, ct);
                    }
                }
            }
            //}
        }
 public void OnSelectionFixed()
 {
     if (WindowManagerPlugin.Instance.WindowPreference.OriginalPreference.AutoCopyByLeftButton)
     {
         ICommandTarget ct = (ICommandTarget)this.GetAdapter(typeof(ICommandTarget));
         if (ct != null)
         {
             CommandManagerPlugin cm = CommandManagerPlugin.Instance;
             Keys mods = Control.ModifierKeys;
             //KM: (CharacterDocumentViewer.OnMouseMove):
             // ■bug: Keys.Control と Keys.Shift は 単語単位・行単位の選択として既に使われている
             if (mods == Keys.Shift)
             {
                 //Debug.WriteLine("NormalCopy");
                 IGeneralViewCommands gv = (IGeneralViewCommands)GetAdapter(typeof(IGeneralViewCommands));
                 if (gv != null)
                 {
                     cm.Execute(gv.Copy, ct);
                 }
             }
             else if (mods == 0)
             {
                 //Debug.WriteLine("CopyAsLook");
                 cm.Execute(cm.Find("org.poderosa.terminalemulator.copyaslook"), ct);
             }
             else
             {
                 TextFormatOption option = TextFormatOption.AsLook | TextFormatOption.TrimEol;
                 if ((mods & Keys.Alt) != 0)
                 {
                     option |= TextFormatOption.Rectangle;
                 }
                 if ((mods & Keys.Shift) != 0)
                 {
                     option &= ~TextFormatOption.AsLook;
                 }
                 if ((mods & Keys.Control) != 0)
                 {
                     option &= ~TextFormatOption.TrimEol;
                 }
                 cm.Execute(new Poderosa.Commands.SelectedTextCopyCommand(option), ct);
             }
         }
     }
 }