Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Console: Support Left/Right Arrow Keys #36657

Open
@obstschale

Description

@obstschale

Description

I'm using Symfony/Console and have a feature request. Basically, I would like to have support for Left/Right arrow keys on Questions. If you use those keys the code^[[D or^[[C is printed. ThisStackOverflow question already asked for a solution 3 years ago.

On slack,@sstok told me that the package used to suppor this, but it has been removed because it was buggy in the past.

I did some research and already found thatblog post where the newCursor class is presented. And the commitsymfony/console@7d292dc#diff-e250abe6b9852c945adf5aebe931a061 did some changes on theQuestionHelper class, where the Up- and Down-Keys are handled.

So I though it might be possible to add support for left/right if these keys are similar handled.

I'm willing to give it a shot and create an PR. But before diving to deep into code I would like to know if there are any other good reasons why the package does not support that.

Slack Conversation with@sstok

Link to Slack Conversation

obstschale: Hi there, I'm new to this Slack and to the Symfony Community. I have a question about Symfony/Console and would like to ask something if this is a bug and if I should/may try to create an PR for that. Where is the best place to ask that?

sstok: Can you provide some more detail?

obstschale: Basically it's that SO question (not mine):https://stackoverflow.com/questions/40280641/symfony-how-to-enable-arrow-keys-left-right-in-questionhelperI have the feeling the Question Object needs to handle arrows keys differently. I found some code in QuestionHelper, where Up and Down Keys are handled but not Left and Right.

sstok: This is a known limitation, in order to make the console work with left/right you need readline support. But this was extremely buggy in the past. And therefor was removed.However. With the addition ofcursor for the Console. it might be possible to add support for this.

obstschale: Yeah, I found the blog Post aboutcursor today and thought, it would be nice to utilize that new class to do that.
I'm no expert, so if you say they removed that feature it might be trickier than I thought

sstok: I think it's best to open an issue, and copy this little conversation for future reference. As Slack messages disappear after some time. I don't know if it's possible :lächeln: this like voodoo to me

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp