-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[data grid] Unable to Paste Row Data in Data Grid with CAPS Lock Key Enabled #11790
Comments
@michelengelen we would like to pick this up |
@michelengelen I would like to pick up this issue. after initial checking I found out when caps lock is on CTRL + v becomes CTRL + V So this mui-x/packages/grid/x-data-grid-premium/src/hooks/features/clipboard/useGridClipboardImport.ts Line 307 in e304266
code will not work as it checking for lowercase v only corrected version of code will be const isPasteShortcut = (event: React.KeyboardEvent) => {
return (
(event.ctrlKey || event.metaKey) &&
(event.key.toLowerCase() === 'v' || event.code.toLowerCase() === 'keyv')
);
}; If you can assign this to me |
@shaharyar-shamshi You can open a PR with the fix. I would avoid |
Yes I agree but it is in or condition to be on safer side I included it. |
But it would be incorrect. E.g. in dvorak layout, the physical V key corresponds to the logical X symbol. So a dvorak user pressing |
Steps to reproduce
Link to live example: https://mui.com/x/react-data-grid/clipboard/
Steps:
Current behavior
When attempting to paste a row of data with CTRL + V while the CAPS lock key is enabled, nothing will happen. However, if you disable the CAPS lock key, the data will be pasted as expected.
Expected behavior
Row data should be successfully pasted regardless of the status of the CAPS lock key
Context
Trying to allow users to paste rows of data from Excel to a data grid for uploading
Your environment
npx @mui/envinfo
Search keywords: caps lock, data grid, past
The text was updated successfully, but these errors were encountered: