<!--
    SPDX-FileCopyrightText: 2000-2003 Shie Erlich <erlich@users.sourceforge.net>
    SPDX-FileCopyrightText: 2000-2003 Rafi Yanai <yanai@users.sourceforge.net>
    SPDX-FileCopyrightText: 2004-2010 Frank Schoolmeesters <codeknight@users.sourceforge.net>
    SPDX-FileCopyrightText: 2000-2022 Krusader Krew <https://krusader.org>
-->
<chapter id="basic-functions">
  <title>Basic Functions</title>
  <sect1 id="controls">
    <title>Controls</title>
    <sect2 id="control-general">
      <title>General</title>
      <para>This is a rather short but important section that will
      go into the details of controlling &krusader;.
      This section does not try to cover all the various key
      combinations for two reasons: 
      <orderedlist numeration="arabic">
        <listitem>
          <para>there are just too many of them</para>
        </listitem>
        <listitem>
          <para>most of &krusader; actions are
          configurable in the
          <link linkend="konfig-panel">Konfigurator Panel page</link></para>
        </listitem>
      </orderedlist>We will only mention the most important
      keyboard shortcuts with the default configuration, but keep
      in mind that most of the <link linkend="key_bindings">Key-Bindings</link> are
      configurable. If you find that you use a certain command a
      lot and want to know the shortcut for this command, or you
      want to change this command shortcut, then check out the
      <link linkend="key_bindings">Configure Shortcuts</link> window (<menuchoice><guimenu>Settings</guimenu> 
      <guimenuitem>Configure Shortcuts...</guimenuitem></menuchoice>).</para>
    </sect2>
    <sect2 id="moving-around">
      <title>Moving Around</title>
      <para>By Moving Around we mean the transfer of the keyboard
      and mouse focus between the different parts of the
      &krusader; 
      <link linkend="mainwindow">main window</link>. The focus can
      be in one of five places: the Left or Right Panel, the Menu
      Bar, the Command Line or the Terminal Emulator. The panel
      that has the focus is called the Active Panel. An Active
      Panel will remain active until the other panel receives the
      focus (&ie;: if the Left Panel was active and you
      clicked on the Command Line - then the Left Panel remains the
      Active Panel). You must deliberately change which panel is
      active.</para>
      <para>The most common way to transfer the focus to a specific
      panel is to use the mouse to click on that panel. But you
      should be aware of the following: 
      <itemizedlist>
        <listitem>
          <para>Clicking on the Toolbar, the FN keys bar or the
          Status Bar does <emphasis>not</emphasis> change the focus.</para>
        </listitem>
        <!--
   Quick View Panel: old Krusader feature , removed since krusader-1.12-beta1      
   <listitem>
     <para>The display part of the Quick View Panel does not accept clicks so you should click on the
           Location Toolbar of this panel if you want it to have focus.</para>
   </listitem>
-->
        <listitem>
          <para>Pushing the 
          <guibutton>Run in Terminal Mode</guibutton> button in the
          Command Line will not transfer the focus, so you have to
          click inside the Input Line.</para>
        </listitem>
        <listitem>
          <para>When you choose a menu, the Menu Bar will become
          focused. It remains focused until you choose a command -
          the focus returns to the previous owner.</para>
        </listitem>
      </itemizedlist></para>
      <para>There are, of course, ways to use the keyboard to
      change the focus: 
      <itemizedlist>
        <listitem>
          <para>The &Tab; Key will switch panels, if one
          of the panels has the focus or rotate between all the
          commands in a menu, if the Menu Bar is active.</para>
        </listitem>
        <listitem>
          <para>The 
          <keycombo action="simul">&Ctrl;
          &Down;</keycombo> will take you from
          the Active Panel to the Command Line or Terminal
          Emulator, and the 
          <keycombo action="simul">&Ctrl;
          &Up;</keycombo> will take you back
          from the Command Line to the Active Panel.</para>
        </listitem>
        <listitem>
          <para>The &Esc; Key will make the Menu Bar
          return the focus, if it has it, to the previous Active
          Panel.</para>
        </listitem>
        <listitem>
          <para>If you happen to be inside the Terminal Emulator,
          you can use the &Tab; Key, or the mouse, to
          navigate to an Active Panel.</para>
        </listitem>
        <listitem>
          <para>Pressing 
          <keycombo action="simul">&Alt;
          <keycap>Underlined Letter</keycap></keycombo> from the
          Menu Bar will open that menu (unless this key combination
          is a <quote>Reserved Key</quote>, used by one of
          &krusader;'s actions).</para>
        </listitem>
      </itemizedlist></para>
    </sect2>
    <sect2 id="selecting-files">
      <title>Selecting</title>
      <note>
        <para>&krusader; offers 4
            <link linkend="selection_modes">Selection Modes</link>, to say nothing about the <link linkend="quickselect">Quickselect bar</link>, only
        &krusader;'s Selection Mode is explained
        here.</para>
      </note>
      <para>Selecting is a skill you need to master in order to get
      the most out of &krusader;. Since the Tree Panel allows select 
      only one folder at a time, this paragraph mainly explains how
      to select files in the List Panel.</para>
      <para>Moving the cursor is easy. Left-clicking on a file or
      folder (referred to herein as <quote>elements</quote> meaning files and
      folders) will select it. Here are some useful pointers
      that will make &krusader; even easier to use (assuming you are
      using &krusader;'s Mouse Selection Mode): 
      <itemizedlist>
        <listitem>
          <para>The 
          &Space; and &Ins; keys will toggle the selection of
          the file under the cursor without affecting the selection
          of other files/folders, the cursor will go one
          position down.</para>
        </listitem>
        <listitem>
          <para>
          <keycap>Left Clicking</keycap> on a file will select, or
          unselect, all previously selected files.</para>
        </listitem>
        <listitem>
          <para>
          <keycombo action="simul">&Ctrl;
          <keycap>Left Clicking</keycap></keycombo> will toggle the
          selection of the file under the cursor without affecting
          the selection of other files/folders.</para>
        </listitem>
        <listitem>
          <para>
          <keycombo action="simul">&Shift;
          <keycap>Left Clicking</keycap></keycombo> will select all
          the elements between the previous cursor location and the
          new one.</para>
        </listitem>
        <listitem>
          <para>
          <keycombo action="simul">&Shift;&Home;</keycombo> selects
          everything above the cursor (and deselects everything
          below the cursor, if selected).</para>
        </listitem>
        <listitem>
          <para>
          <keycombo action="simul">&Shift;&End;</keycombo> selects
          everything below the cursor (and unselects everything
          above the cursor, if selected).</para>
        </listitem>
        <listitem>
          <para>The <quote>..</quote> entry is not selectable.</para>
        </listitem>
        <listitem>
          <para>The <link linkend="edit-menu">Edit menu</link> can offer more ways
          to select your files.</para>
        </listitem>
      </itemizedlist></para>
    </sect2>
    <sect2 id="executing_commands">
      <title>Executing Commands</title>
      <para>There is not a lot to say here, all you need to do is
      select some files (if you do not, &krusader; will
      operate on the file(s) or folder(s) that have the focus),
      choose a 
      <link linkend="menu-commands">Command</link> from the Menu Bar
      or use a Keyboard Shortcut (or the Right Click Menu) and the
      selected Command executes. See also 
      <link linkend="executing_files">Executing
      Files</link>.</para>
    </sect2>
    <sect2 id="quicksearch">
      <title>Quick search</title>
      <!-- Thanks to Heiner Eichmann -->
      <para>This feature will do a quick search for the file name
      in the Active List Panel.</para>
      <para>Type 
      <keycap>foo</keycap>(one character) to do a quick search in
      the Active List Panel for a file beginning with <quote>foo</quote>. A
      small quick search dialog box will open below the Active List
      Panel. Type the first few characters of the desired file name
      (more than one character allowed), the cursor will jump to
      that filename (if it exists), &eg; type <quote>ab</quote> to
      search for a file which begins with <quote>ab</quote>. The
      &Up;/&Down; keys will jump to the next or
      previous match. &Esc; will close the quick search
      line. The cursor will stay on the last file
      found. The Quicksearch supports <ulink url="https://en.wikipedia.org/wiki/Regular_expression">regular expressions</ulink> for searching files.</para>
      <note>
        <para>If you press 
        <keycombo action="simul">&Alt;
        <keycap>foo</keycap></keycombo>, the key binding shortcut
        will be executed. If there is no configured key binding,
        the remaining letter 
        <keycap>foo</keycap> will be used for the quick
        search.</para>
      </note>
      <para>Use <link linkend="key_bindings">Configure Shortcuts</link> window (<menuchoice><guimenu>Settings</guimenu> 
      <guimenuitem>Configure Shortcuts...</guimenuitem></menuchoice>).</para>
    </sect2>
    <sect2 id="quickfilter">
      <title>Quick filter</title>
      <para>This feature will do a quick filter for the file list
      in the Active Panel.</para>
      <para>Press <keycombo>&Ctrl;<keycap>I</keycap></keycombo> to open Quickfilter bar.
      Type <keycap>foo</keycap> (one character) to filter out from the Active Panel all the files
      that do not have <quote>foo</quote> in names. You can use wildcards for the filtering. &eg; use <quote>a*b</quote> to
      filter files which have <quote>a</quote> and <quote>b</quote> in their names. The Quickfilter follows the
      <link linkend="konfig-panel-general">case-sensitivity setting</link> of Quicksearch.</para>
      <para>Pressing &Enter; in Quickfilter mode sets focus to panel, when panel or Quickfilter is focused, &Esc; closes Quickfilter.
      </para>
      <para>To change the default shortcut of Quickfilter use <link linkend="key_bindings">Configure Shortcuts</link> window (<menuchoice><guimenu>Settings</guimenu> 
      <guimenuitem>Configure Shortcuts...</guimenuitem></menuchoice>).</para>
    </sect2>
    <sect2 id="quickselect">
      <title>Quick select</title>
      <para>This feature will do a quick select for the file list
      in the Active Panel.</para>
      <para>Press <keycombo>&Ctrl;&Shift;<keycap>S</keycap></keycombo> to open Quickselect bar.
      Type <keycap>foo</keycap> (one character) to filter out from the Active Panel all the files
      that do not have <quote>foo</quote> in names. You can use wildcards for the filtering. &eg; use <quote>a*b</quote> to
      filter files which have <quote>a</quote> and <quote>b</quote> in their names. The Quickselect follows the
      <link linkend="konfig-panel-general">case-sensitivity setting</link> of Quicksearch.</para>
      <para>Pressing &Enter; in Quickselect mode sets focus to panel, when panel or Quickselect is focused, &Esc; closes Quickselect.
      </para>
      <para>To change the default shortcut of Quickselect use <link linkend="key_bindings">Configure Shortcuts</link> window (<menuchoice><guimenu>Settings</guimenu> 
      <guimenuitem>Configure Shortcuts...</guimenuitem></menuchoice>).</para>
    </sect2>
    <sect2 id="context-menu">
      <title>Context Menu</title>
      <para>&krusader; has many Context menus that allow
      you to do fast operations with the mouse, usually a
      right-click will open the Context menu (depending on your
      <link linkend="selection_modes">Selection Modes</link> settings). This list
      gives an overview of the most important context menus. Use
      them to discover the available commands. 
      <itemizedlist>
        <listitem>
          <para><link linkend="mainwindow">Main Toolbar</link> (orientation, text
          position, icon size)</para>
        </listitem>
        <listitem>
          <para><link linkend="list_panel">List Panel</link> on a file or
          folder</para>
        </listitem>
        <listitem>
          <para><link linkend="cmdline">Command Line</link> (undo, paste, text
          completion...)</para>
        </listitem>
        <listitem>
          <para><link linkend="termemu">Terminal emulator</link> (send signal, font,
          history...)</para>
        </listitem>
        <listitem>
          <para><link linkend="folder-tabs">Folder tabs</link> (new, duplicate,
          close)</para>
        </listitem>
        <listitem>
          <para>
          <link linkend="krusearcher">KruSearcher</link> Search
          results file list (<keycap>F3</keycap> View, <keycap>F4</keycap> Edit)</para>
        </listitem>
        <listitem>
          <para><link linkend="mount-man">MountMan</link> (unmount,
          format...)</para>
        </listitem>
        <listitem>
          <para><link linkend="synchronizer">Synchronize Folders</link> File List</para>
        </listitem>
        <listitem>
          <para><link linkend="useractions">UserActions</link></para>
        </listitem>
        <listitem>
          <para>&konqueror; Right-Click actions are
          shown in &krusader;</para>
        </listitem>
        <listitem>
          <para>Show/hide 
          <link linkend="list_panel">Column Headers</link></para>
        </listitem>
        <listitem>
          <para><link linkend="bookman">Bookmarks</link> enable/disable permanent
          bookmarks</para>
        </listitem>
        <listitem>
          <para>...</para>
        </listitem>
      </itemizedlist></para>
    </sect2>
  </sect1>
  <sect1 id="basic">
    <title>Basic File Management</title>
    <sect2 id="executing_files">
      <title>Executing Files</title>
      <para>You can only execute files in the Active List Panel. To
      execute a file just 
      (double-)click on it or press &Enter; when it
      is under the list cursor. &krusader; will open it
      in the default application for this file type (picture,
      text file...) or the file will be executed (script,
      binary...). If you want to use 
      another application to open the file, 
      click with the &RMB; on the file and go to the <guisubmenu>Open
      with</guisubmenu> sub-menu which will offer more options.
      &krusader; is compatible with the &plasma;
      default file manager for all file types except archives that
      are opened inside the &krusader; panel and not in
      an external application. See 
      <link linkend="konfig-archives">the archives page in
      Konfigurator</link> for details.</para>
    </sect2>
    <sect2 id="copying">
      <title>Copying and Moving</title>
      <figure id="screenshot-copyjob" float="1">
        <title>Copy dialog</title>
        <mediaobject>
          <imageobject>
            <imagedata fileref="copyjob.png"></imagedata>
          </imageobject>
          <textobject>
            <phrase>Copy dialog</phrase>
          </textobject>
        </mediaobject>
      </figure>
      <para>To copy or move files/folders just select them and
      press 
      <keycap>F5</keycap> to 
      copy or
      <keycap>F6</keycap> to 
      move them. &krusader; tries to preserve the time of
      modification. When copying a folder owner is changed to the user which
      copies the folder, group is changed to the default group of the user.
      When copying a file owner is changed to the user which copies the file,
      group is changed to default group of the user, and permissions are
      preserved. The owner, the group and the permissions are preserved when
      moving file or folder. When copying or moving files/folders a dialog
      appears and allows you to choose the operation destination.
      The default destination is the other-panel browsed folder. If you enter
      a partial &URL;, &krusader; will use the current
      panel folder as the &URL; base.</para>
    </sect2>
    <sect2 id="queue">
      <title>Queue manager</title> 
      <para>
      The copy, move, pack and unpack operations can be queued.
      After selecting copy or move, hit <keycap>F2</keycap> to use it.
      After selecting pack or unpack, hit <keycap>F2</keycap> to use it. 
      Or the direct shortcuts: copy by queue <keycombo action="simul">&Shift;<keycap>F5</keycap></keycombo> , 
      move by queue <keycombo action="simul">&Shift;<keycap>F6</keycap></keycombo> .
      Queue manager performs actions one-by-one.
      For example, if you have a pen drive (which is slow), and you want to copy 40 files onto it, 
      it is much better copying them one-by-one instead of starting to copy 40 files in parallel.
      That is why enqueuing is important.
      If you pack/unpack 40 files in parallel, you overload your computer,
      but adding them to a queue, is much more useful.
      </para>
      <para>It is possible to switch the <link linkend="job-queue-mode">Queue Manager mode</link> by the <menuchoice><guimenu>Settings</guimenu> <guimenuitem>Job Queue Mode</guimenuitem></menuchoice> menu item.
      </para>
    </sect2>
    <sect2 id="deleting">
      <title>Deleting - move to &plasma; Trash</title>
      <para>Deleting files/folders is done by selecting them and pressing <keycap>F8</keycap> or <keycap>Delete</keycap>.
      By <link linkend="konfig-general">default</link> it will be moved to &plasma; Trash.
      You can open the &plasma; Trash with the Trash icon in the <link linkend="main_toolbar">Main Toolbar</link> or with 
      the <filename>trash:/</filename> KIO slave.
      Physically &plasma; Trash is located in <filename>~/.local/share/Trash/</filename> or <filename>Trash</filename> in the subfolder in user home folder which can be determined using the <userinput>qtpaths --paths GenericDataLocation</userinput> command.
      <keycombo action="simul">&Ctrl;
      <keycap>Delete</keycap></keycombo> will delete the file
      permanently. A dialog will ask for your confirmation and will
      warn you when deleting non-empty folders. Of course only
      operations that are permitted to do by the Operating
      System will be performed - you will be notified otherwise. If
      you do not wish to see the confirmation dialogs, you can
      disable them in the 
      <link linkend="konfig-advanced">Konfigurator advanced
      page</link>. If you set to delete permanently files in the <link linkend="konfig-general">Konfigurator general
      page</link>, <keycap>F8</keycap> or <keycap>Delete</keycap> will permanently delete files,
      while <keycombo action="simul">&Ctrl; <keycap>Delete</keycap></keycombo> will move them to &plasma; Trash.</para>
    </sect2>
    <sect2 id="shred">
      <title>Shred Files</title>
      <para>Shred was removed from &kde; 4 (and as consequence &krusader;-2 for &kde; 4).
           The main reason is probably that shredding is filesystem dependent and even if you overwrite the file 100 times, it is not sure, that it will be deleted from the disk finally.
           Quote from the &kgpg; posts: <quote>The shred feature has been removed from the &kde; library. &kgpg; will not support this feature anymore. Moderns file systems use journalisation. So the shred feature should be implemented in the file system. Not in &kgpg;.</quote>
           But you might use a proper shred <link linkend="useractions">UserAction</link> for your filesystem.
	   But keep in mind that if you want to be 100% sure that it is impossible that someone can read a deleted file, you need to destroy your harddrive hardware...
	   </para>
    </sect2>
    <sect2 id="renaming">
      <title>Renaming Files, Creating Directories and Link
      Handling</title>
      <para>
      Rename the file under the cursor with the 
      <keycap>F2</keycap> key or with two single mouse clicks. If
      only the file name needs to be renamed and not the extension,
      you can configure this in the
      <link linkend="konfig-general-atomic">Konfigurator General page</link>. 
      <guilabel>Create a new folder</guilabel> with the
      <keycap>F7</keycap> key. 
      Right-clicking on a regular file will give
	you the option <menuchoice><guisubmenu>Link Handling</guisubmenu> <guimenuitem>New Symlink...</guimenuitem></menuchoice>. A dialog will prompt
      you to enter a symlink name. That symlink will point to the
      file/folder you right-clicked on. If the file you
      right-clicked on is a symlink, you will also be presented
      with the <menuchoice><guisubmenu>Link Handling</guisubmenu> <guimenuitem>Redirect Link</guimenuitem></menuchoice> option that will allow you to change
      the link target.</para>
    </sect2>
    <sect2 id="viewing">
      <title>Viewing and Editing files</title>
      <para>
      <link linkend="krviewer">KrViewer</link> has a chapter of its
      own.</para>
    </sect2>
  </sect1>

<!-- call the archives sect1 section -->
&archives;

</chapter>
