-
Notifications
You must be signed in to change notification settings - Fork 0
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] [ARCH] Impossible for extensions to override Tab key behavior where code hints might be open #4304
Comments
Comment by peterflynn CC |
Comment by JeffryBooher Moving this to Backlog to consider with API enhancements card. |
Comment by peterflynn This is definitely out of scope for that story (we decided in Monday's arch meeting that no specific APIs would be considered -- only broad strokes). Reopening but leaving tagged MTB so we can find this a more suitable home on the backlog. |
Comment by njx Tagging [ARCH] - it's not totally obvious to me right now what the right fix is and it's probably worth discussing it at the architecture meeting. |
Comment by TomMalbran What about having priorities on the global keydown hooks? Emmet could then use a keydown hook with a higher priority than the keydown hook used by the Code Hints. Also, the keydown hook should receive a translated key to make it easier to distinguish between "Ctrl/Shift/Alt.. + key" from just "key". It can also receive the event, if is still required. |
Comment by peterflynn #4904 would render this whole issue moot |
Comment by TomMalbran The same issue could eventually appear with other keys. |
Comment by peterflynn Fair point -- and #4963 might eventually allow users to re-enable Tab handling for code hints, which would make even the Tab issue come back for some users. So, leaving open for now. |
Issue by peterflynn
Tuesday Aug 06, 2013 at 00:10 GMT
Originally opened as adobe/brackets#4660
Result:
When code hints are open, Tab selects the top item, inserting
backface-visibility:|
.When code hints not open, Tab does the Emmet behavior, inserting
bottom: |;
.Expected:
We should allow extensions to override key handling in the editor area even when code hints are (potentially) open, since code hints appear almost all the time when typing.
I have a similar case for JS snippets. E.g. I'd like to be able to type "clog"+Tab and get
console.log("|");
inserted. But because JS code hints always come up with a camelcase suggestion oflocalStorage
, this is blocked by code hints 100% of the time.This used to work, but I think it broke in Sprint 26 when fba13c23 switched code hints to a "global keydown hook" which, once installed at the time the hints open, is effectively impossible to override. I looked into many ways of getting around this hook, but afaict it is 100% impossible. (There's not even an easy way to install your own higher-precedence global hook, since there's no notification to tell you when code hints have been opened).
The text was updated successfully, but these errors were encountered: