Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds methods for disabling the default VIM mappings and setting your own #172

Merged
merged 1 commit into from
Apr 1, 2019

Conversation

vesper8
Copy link
Contributor

@vesper8 vesper8 commented Apr 1, 2019

example usage:

        $menu = (new CliMenuBuilder)
        ->addItem('Print A', function () { echo 'A'; })
        ->build();

        $menu->disableDefaultControlMappings();

        $menu->open();
        $menu = (new CliMenuBuilder)
        ->addItem('Print A', function () { echo 'A'; })
        ->build();

        $defaultControlMappings = [
            'a' => InputCharacter::LEFT,
            's' => InputCharacter::DOWN,
            'w' => InputCharacter::UP,
            'd' => InputCharacter::RIGHT,
        ];

        $menu->setDefaultControlMappings($defaultControlMappings);

        $menu->open();

adds a method for setting default control mappings
@Lynesth
Copy link
Collaborator

Lynesth commented Apr 1, 2019

To be honest I don't really care about the VIM mapping and even think we could simply remove those by defaults.

@mikeymike
Copy link
Member

@Lynesth removal at this point would be a BC, maybe something we can consider when we're closer to another major version ?

@AydinHassan AydinHassan merged commit 33ac5c0 into php-school:master Apr 1, 2019
@AydinHassan
Copy link
Member

AydinHassan commented Apr 1, 2019

Thanks @vesper8 ! docs would be appreciated 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants