customize file panel hot key [DONE]

Questions, glitches, bugs and crashes
marvelph
Posts: 6
Joined: Fri Oct 30, 2015 10:28 am

customize file panel hot key [DONE]

Post by marvelph » Fri Oct 30, 2015 10:36 am

I want to customize the "Other hotkeys".
For example, the "Change current selection and move to next item" it is assigned to the "space key".

User avatar
mike
Posts: 1060
Joined: Thu Jul 16, 2015 5:35 am
Location: Exeter, UK

Re: customize file panel hot key

Post by mike » Sun Nov 01, 2015 11:34 am

marvelph wrote:I want to customize the "Other hotkeys".
For example, the "Change current selection and move to next item" it is assigned to the "space key".
Hello marvelph and welcome to forum!
I strongly agree with a point that such hotkeys should be available for customisation.
Some works has to be done to allow such "simple" hotkeys (a single buttons, not a combination with modifier) wiring and it seems to be quite worth it.
Mike.

don
Posts: 134
Joined: Sat Jul 18, 2015 11:03 am
Location: Sydney, AU

Navigation Key Mapping

Post by don » Tue Dec 15, 2015 1:27 am

Good day,

it looks like my first post might have gone missing.

Essentially I am looking as to where I could remap the navigation keys.
The reason is thatI am trying to use karabiner to switch keypad into navigation pane, but there seems to be a few conflicts. Trying to figure them out.

Can it be that navigation keys and PgUp/PgDn have been hardcoded?

User avatar
mike
Posts: 1060
Joined: Thu Jul 16, 2015 5:35 am
Location: Exeter, UK

Re: Navigation Key Mapping

Post by mike » Tue Dec 15, 2015 4:59 am

Hi don,

Currently all navigation keys are hardcoded as hell.
I haven't used karabiner or similar software, can you explain what is your goal?

Mike.

don
Posts: 134
Joined: Sat Jul 18, 2015 11:03 am
Location: Sydney, AU

Re: Navigation Key Mapping

Post by don » Tue Dec 15, 2015 7:27 am

Karabiner allows to intercept and redefine key inputs.

For instance with a full size keyboard I was able to redefine keypad for Files navigation.

Example:
<autogen>__KeyToKey__ KeyCode::KEYPAD_PLUS, ModifierFlag::NONE, KeyCode::EQUAL, ModifierFlag::COMMAND_L</autogen>

Keypad Plus sends the COMMAND-EQUAL which brings the selection mask dialog box.


What I am trying to achieve is to remap HOME and END (1 and 7) to behave as I want them to in FILES but act as HOME and END everywhere else.
The easiest (as it appeared to me) was to just reassign jumping to the beginning of the list and end of the list within Files. I am just used to have KEYPAD HOME to bring me up to ".." :)

Hope this makes sense.

How difficult would it be to make them configurable as well?

I am OK for now, but again, Corporal Files would appreciate another promotion :)

don
Posts: 134
Joined: Sat Jul 18, 2015 11:03 am
Location: Sydney, AU

Re: Navigation Key Mapping

Post by don » Tue Dec 15, 2015 9:11 am

Also,

karabiner allows to define rules for a single app:

<appdef>
<appname>APPSTORE</appname>
<equal>com.apple.appstore</equal>
</appdef>


How do I refer filesmanager? "info.filesmanager" ? I tried. Did not work (may be karabiners issue) - is it the correct reference?

User avatar
mike
Posts: 1060
Joined: Thu Jul 16, 2015 5:35 am
Location: Exeter, UK

Re: Navigation Key Mapping

Post by mike » Tue Dec 15, 2015 9:15 am

Don,

BundleID for app is stored in Info.plist, for Non-MAS Files it's info.filesmanager.files
I'll check what is going on with this keys remapping soon.

Mike.

don
Posts: 134
Joined: Sat Jul 18, 2015 11:03 am
Location: Sydney, AU

Re: Navigation Key Mapping

Post by don » Wed Dec 16, 2015 2:33 am

Thank you - that helped.

Here is the first cut with Karabiner, in case anyone is interested.

The idea is to use the numpad as the navigation device:

Code: Select all

<?xml version="1.0"?>
<root>
  <appdef>
    <appname>FILESMANAGER</appname>
    <equal>info.filesmanager.Files</equal>
  </appdef>

  <item>
    <name>Keyboard Custom Navigation</name>
    <appendix>Except: TeamViewer,EMACS,X11,Citrix Viewer, VNC</appendix>
    <identifier>private.keyboard_custom_navigation</identifier>
    <not>TEAMVIEWER, EMACS, X11, CITRIX_ONLINE_PLUG_IN, CITRIX_XEN_APP_VIEWER, VNC</not>
    <autogen>__KeyToKey__ KeyCode::KEYPAD_2, KeyCode::CURSOR_DOWN</autogen>
    <autogen>__KeyToKey__ KeyCode::KEYPAD_8, KeyCode::CURSOR_UP</autogen>
    <autogen>__KeyToKey__ KeyCode::KEYPAD_4, KeyCode::CURSOR_LEFT</autogen>
    <autogen>__KeyToKey__ KeyCode::KEYPAD_6, KeyCode::CURSOR_RIGHT</autogen>
    <autogen>__KeyToKey__ KeyCode::KEYPAD_9, KeyCode::CURSOR_UP, ModifierFlag::FN</autogen>
    <autogen>__KeyToKey__ KeyCode::KEYPAD_3, KeyCode::CURSOR_DOWN, ModifierFlag::FN</autogen>
    <autogen>__KeyToKey__ KeyCode::KEYPAD_5, ModifierFlag::NONE, KeyCode::T, ModifierFlag::COMMAND_L | ModifierFlag::OPTION_L </autogen>
    <autogen>__KeyToKey__ KeyCode::KEYPAD_0, ModifierFlag::NONE, KeyCode::CURSOR_DOWN, ModifierFlag::SHIFT_L</autogen>
    <autogen>__KeyToKey__ KeyCode::KEYPAD_PLUS, ModifierFlag::NONE, KeyCode::EQUAL, ModifierFlag::COMMAND_L</autogen>
    <autogen>__KeyToKey__ KeyCode::KEYPAD_MINUS, ModifierFlag::NONE, KeyCode::MINUS, ModifierFlag::COMMAND_L</autogen>
  </item>

  <item>
    <name>Keyboard Custom Navigation - EXTENSION</name>
    <appendix>Except: FILES</appendix>
    <identifier>private.keyboard_custom_extension</identifier>
    <not>TEAMVIEWER, EMACS, X11, CITRIX_ONLINE_PLUG_IN, CITRIX_XEN_APP_VIEWER, VNC, FILESMANAGER</not>
    <autogen>__KeyToKey__ KeyCode::KEYPAD_7, KeyCode::CURSOR_LEFT, ModifierFlag::COMMAND_L</autogen>
    <autogen>__KeyToKey__ KeyCode::KEYPAD_1, KeyCode::CURSOR_RIGHT, ModifierFlag::COMMAND_L</autogen>
    <autogen>__KeyToKey__ KeyCode::KEYPAD_DOT, KeyCode::DELETE, ModifierFlag::FN</autogen>
  </item>

  <item>
    <name>Keyboard Custom Navigation - FILES</name>
    <appendix>Only: FILES</appendix>
    <identifier>private.keyboard_custom_files</identifier>
    <only>FILESMANAGER</only>
    <autogen>__KeyToKey__ KeyCode::KEYPAD_7, KeyCode::CURSOR_LEFT, ModifierFlag::FN</autogen>
    <autogen>__KeyToKey__ KeyCode::KEYPAD_1, KeyCode::CURSOR_RIGHT, ModifierFlag::FN</autogen>
    <autogen>__KeyToKey__ KeyCode::KEYPAD_DOT, KeyCode::DELETE</autogen>
  </item>

</root>

User avatar
mike
Posts: 1060
Joined: Thu Jul 16, 2015 5:35 am
Location: Exeter, UK

Re: Navigation Key Mapping

Post by mike » Thu Dec 17, 2015 8:59 am

Don,

I have tried Karabiner with your setup - really cool stuff!
Can you please clarify - so you was able to remap Files navigation keys you wanted to?

Mike.

don
Posts: 134
Joined: Sat Jul 18, 2015 11:03 am
Location: Sydney, AU

Re: Navigation Key Mapping

Post by don » Mon Dec 21, 2015 11:55 am

Good day.

Yes. Pretty much. As you can see there are a few overrides just for FILES. Hard to group.

Things to do are to configure the keys outside of the files:
I do not like that pageup and pagedown are shifting the screen without moving the cursor.
And the custom config for the extra keys in the middle of the normal keyboard - just do not know how to properly identify them.
Ability to redefine some keys in Files would allow for a very succint Karabiner config to cover both NUMPAD and dedicated pageup/pagedown.

Cheers.

Locked