JSON::Karabiner::Manipulator::Actions::From - From defintion
use JSON::Karabiner; my $from_action = $manip_obj->add_action('from'); # Use methods to add data to the C<from> action: $from_action->add_key_code('h'); $from_action->add_optional_modifiers('control', 'left_shift');
The from action describes the key and button presses that you want Karbiner to modify. For example, you may want Karbiner to do something when you hit Control-Shift-h.
from
Control-Shift-h
Below are the methods used to add data to the from action. Consult the official Karbiner documentation about the from data structure.
The constructor method is not called directly. The from action object is more typically created via the manipulator object's add_action() method.
add_action()
Add a key_code property to a from action:
key_code
$from->add_key_code('h');
See official Karbiner documentation
Add an any property to a from action:
any
$from->add_any($value);
Add an consumer_key_code property to a from action:
consumer_key_code
$from->add_consumer_key_code('MUSIC_NEXT');
Add an pointing_button property to a from action:
pointing_button
$from->add_pointing_button('button2');
Add an optional_modifiers property to keycodes in a from action:
optional_modifiers
$from->add_optional_modifiers('control', 'shift', 'command');
Add an mandatory_modifiers property to keycodes in a from action:
mandatory_modifiers
$from->add_mandatory_modifiers('shift', 'command');
Add an simultaneous property to a from action:
simultaneous
$from->add_simultaneous('a', 'j');
An optional key_code_type can be passed in as the first argument:
key_code_type
$from->add_simulataneous('pointing_button', 'button1', 'button2')
If no key_code_type value is detected, a default value of key_code is used.
$from->add_simultaneous_options('key_down_order', 'strict');
Multiple options by set my calling this method multiple times.
version 0.009
Steve Dondley <s@dondley.com>
This software is copyright (c) 2020 by Steve Dondley.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install JSON::Karabiner, copy and paste the appropriate command in to your terminal.
cpanm
cpanm JSON::Karabiner
CPAN shell
perl -MCPAN -e shell install JSON::Karabiner
For more information on module installation, please visit the detailed CPAN module installation guide.