Comments (6)
![image](https://private-user-images.githubusercontent.com/37499095/360995715-55e18587-618e-41b0-b50e-1b3c72e2f015.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUzNzYwNDMsIm5iZiI6MTcyNTM3NTc0MywicGF0aCI6Ii8zNzQ5OTA5NS8zNjA5OTU3MTUtNTVlMTg1ODctNjE4ZS00MWIwLWI1MGUtMWIzYzcyZTJmMDE1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTAzVDE1MDIyM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI1NmQ0NjAwYzUzZTM5ZDRkYTg2ZjUzZWY3ODU3ZmRiYzhjYzIyNzllM2M0MTJhOTEzYmI0NjI4NWQ2YzEzMjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.PUl_wsClIAJpYzE9eg03zIco3jUW81GrEPdY2HkKrGQ)
Using option key modifies the value of event.key, so instead of using option we can use control key or another solution is using code value instead of key. For example the code always will be Digit1 but the key can be "1" or "i" or something else, removing the Digit prefix will solve the issue but in searchable lists field is updated with the value instead of executing shortcut.
I'm gonna open PR with using control key solution.
I'm adding the "using event.code instead of key and clear the Digit prefix" solution here as a referance if anyone needs to use altKey for shortcut later.
![image](https://private-user-images.githubusercontent.com/37499095/361006288-ac632688-5376-48e0-8153-7da7f0fd9583.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc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SUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTAzVDE1MDIyM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU0NmYwODA4OWY4MDQxZTI3ZmM4MTliYzE3MzExMWU4ODdiY2M5OTFhMTEzMjQ4ODZmNzNhMzY5NTVkNGQ1NjEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.YCMR6K7il4yF_FHedAa2uVvk3s1i3pLyEJokG_JoYqo)
from visual-ts.
Hey @AhmetSBulbul π
Thank you for the heads up.
Isn't CTRL key used for switching tabs on Windows devices? CTRL + 1-9 key combination is reserved for this purpose as far as I know.
Maybe we use CTRL for Mac and Alt on Windows, or use the other solution you offered. That would be great if you can test that behavior on Windows or open a branch/draft PR for me to test
Cheers
from visual-ts.
Okay, right now it's optional, both of them are working. I updated the PR as a draft. If we don't have more complex use case I'm gonna just create new Component to show the right key according to OS. I don't have a windows setup to test right now but I haven't changed the logic, I just added a "or" statement so it must be working as expected. But if you have a chance to test you can let me know if there is an any problem.
from visual-ts.
Let's keep this branch only for fixing the bug.
That would be great if you can create a new issue for showing the right key enhancement if you have time. I can also create the issue next week. we can implement showing the right key with:
- using/creating a custom hook for getting OS details, and call that in
KeyCombinationLabel
- add a util function, and call that in
KeyCombinationLabel
- Or other ways?
and here is how you can change User Agent from Chrome Dev Tools:
https://developer.chrome.com/docs/devtools/device-mode/override-user-agent
So you can change Firefox/Opera/Chrome and Mac/Windows while workingπ
from visual-ts.
Thanks for the trick. I'm gonna create an issue as soon as possible. If you have a chance to open before me, you can mention me in the comment.
from visual-ts.
Closing this issue as completed thanks to PR by @AhmetSBulbul πͺ
from visual-ts.
Related Issues (11)
- Adding Path Aliases for Local Imports within Packages HOT 1
- Grab declared variables for function params
- Create a shared React component subpackage HOT 4
- Create a React SPA with Vite
- Generate JSON of scanned and parsed functions for SPA compatibility
- Add nested sorting functionality to Blocks
- Save/Load functionality for Blocks
- Standardize ESLint Configuration Across the Project
- Use TypeScript Compiler API for Creating Interfaces, Types, and Functions
- Fix `FunctionInfoPopover` click behaviour
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from visual-ts.