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

[CLOSED] CodeHintManager needs to be smarter about key processing #2417

Open
core-ai-bot opened this issue Aug 29, 2021 · 9 comments
Open

[CLOSED] CodeHintManager needs to be smarter about key processing #2417

core-ai-bot opened this issue Aug 29, 2021 · 9 comments

Comments

@core-ai-bot
Copy link
Member

Issue by redmunds
Monday Jan 14, 2013 at 19:48 GMT
Originally opened as adobe/brackets#2539


This was reported by@zoufahl when developing CSS Code Hints.

In CodeHintManager handleKeyEvent function is this block of code:

  } else if (event.type === "keyup") {
    if (_inSession(editor)) {
      if ((event.keyCode !== 32 && event.ctrlKey) || event.altKey || event.metaKey) {
        // End the session if the user presses any key with a modifier (other than Ctrl+Space).
        _endSession();
      } else ...

The problem is when the code hint session starts on keyup and the user is trying to insert a "{" from a German keyboard (which is Alt+8). Maybe a keybinding lookup would make more sense here. Consult@RaymondLim.

@core-ai-bot
Copy link
Member Author

Comment by pthiess
Friday Jan 18, 2013 at 23:09 GMT


Reviewed

@core-ai-bot
Copy link
Member Author

Comment by RaymondLim
Friday Jan 18, 2013 at 23:21 GMT


@iwehrman I don't think we need the new code that you added to check for modifier keys. I don't see any issue after removing the code. Please let me know the specific issue that you want to resolve it with this code.

Otherwise, we do really need to remove the code since lots of keyboard layouts require users to type characters like /[]{};:<> with modifier keys.

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Saturday Jan 19, 2013 at 00:05 GMT


I think the reason it was added was so that keyboard shortcuts do not get caught. I think that's a different issue.

@core-ai-bot
Copy link
Member Author

Comment by RaymondLim
Saturday Jan 19, 2013 at 00:19 GMT


If it is the case, I would like to know the scenario where the keyboard shortcuts gets caught. My guess is that Ian just wants to dismiss code hints when a keyboard shortcut is pressed. We didn't do that in the old design and the code hints keep showing.

@core-ai-bot
Copy link
Member Author

Comment by iwehrman
Sunday Jan 20, 2013 at 03:55 GMT


The original idea was to close the hinting session on "complex" editor changes, as can occur as a result of, e.g., cut or paste operations. Perhaps we can find another way to detect such changes.

@core-ai-bot
Copy link
Member Author

Comment by RaymondLim
Thursday Jan 31, 2013 at 19:39 GMT


Thanks. I'm removing this particular code so that users can type any characters that require modifier keys.

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Friday Feb 08, 2013 at 06:19 GMT


Confirmed. Closing.

@core-ai-bot
Copy link
Member Author

Comment by RaymondLim
Friday Feb 08, 2013 at 19:50 GMT


Reopen it since pull request #2756 introduced #2820 and we have to revert my changes. Since we currently don't have any code hints that have to be triggered with {, I am lowering this to low priority and removing sprint 20 milestone.

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Thursday Mar 28, 2013 at 23:54 GMT


This does not affect any current code hints. Closing.

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

No branches or pull requests

1 participant