NAME
JSON::Karabiner::Manipulator::Conditions - turns baubles into trinkets
SYNOPSIS
# add the condition
add_condition('variable_if');
# add data to it with the appropriate method
add_variable('some_var_name' => 'some_value')
DESCRIPTION
Condtions make the from
and to
actions conditional upon the values of other data. This gives you more control over when and under what environments your actions will occur. Below is an overview of how to set the conditions available to you via Karabiner.
Note that the condition objects must be created before you can add data to them. See the example in the Synopsis above.
'device_if' and 'device_unless'
add_identifier('vendor_id' => 5, 'product_id' => 2222);
add_identifier('vendor_id' => 6, 'product_id' => 2223);
add_description('some description');
See Karabiner official documentation
'event_changed_if' and 'event_chaned_unless'
add_value( 'true' );
add_description('some description');
See Karabiner official documentation
'frontmost_application_if' and 'frontmost_application_unless'
add_bundle_identifiers( 'bundle_id_one', 'bundle_id_two');
add_file_paths( 'file_path1', 'file_path2');
add_description('some description');
See Karabiner official documentation
'input_source_if', and 'input_source_unless'
add_input_source('language' => 'languare regex', 'input_source_id' => 'input source id regex');
add_input_source('language' => 'languare regex', 'input_source_id' => 'input source id regex');
add_description('some description');
See Karabiner official documentation
'keyboard_type_if', and 'keyboard_type_unless'
add_keyboard_types('keybd_type1', 'keybd_type2')
add_description('some description')
SeE Karabiner official documentation
'variable_if', and 'variable_unless'
add_variable('variable_name' => 'value');
See Karabiner official documentation
VERSION
version 0.016
AUTHOR
Steve Dondley <s@dondley.com>
COPYRIGHT AND LICENSE
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.