Problem with shortcuts in polish language #286

Closed
opened 2026-02-04 18:18:50 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @azug on GitHub (Mar 2, 2017).

For Feature Requests

Desired Feature: remove shortcut during hold right alt + s.

For Bug Reports

  • BookStack Version: BookStack v0.15.0
  • PHP Version: PHP 5.6.30-0+deb8u1
  • MySQL Version: Ver 14.14 Distrib 5.6.30
Expected Behavior

When hold right alt and enter "s" do nothing

Actual Behavior

When hold right alt and enter "s" in polish language you can enter "ś" letter but when I try to insert "ś" in text area document bookstack "save draft". It happen only when editing document.
Look at below screenshot:
http://screenshot.sh/n9nZrlvJNsyz2

Is it possible to turn off all shortcuts ?

Regards,
Arkadiusz Zug

Originally created by @azug on GitHub (Mar 2, 2017). ### For Feature Requests Desired Feature: remove shortcut during hold right alt + s. ### For Bug Reports * BookStack Version: BookStack v0.15.0 * PHP Version: PHP 5.6.30-0+deb8u1 * MySQL Version: Ver 14.14 Distrib 5.6.30 ##### Expected Behavior When hold right alt and enter "s" do nothing ##### Actual Behavior When hold right alt and enter "s" in polish language you can enter "ś" letter but when I try to insert "ś" in text area document bookstack "save draft". It happen only when editing document. Look at below screenshot: http://screenshot.sh/n9nZrlvJNsyz2 Is it possible to turn off all shortcuts ? Regards, Arkadiusz Zug
Author
Owner

@arkadiyasuratov commented on GitHub (Sep 15, 2017):

Can confirm. The issue is still present in the current beta v0.18. Would be nice to be able to remap the key in the settings panel or just be able to turn off this particular shortcut.

Qucik and ugly way to solve it, is by editing the file common.js in public/js/ directory.

Just find and remove this line of code:
n.on("keydown",function(e){83===e.keyCode&&(navigator.platform.match("Mac")?e.metaKey:e.ctrlKey)&&(e.preventDefault(),t.$emit("save-draft",e))}),

Here's the file from version v0.18 without the above line of code.

Or you can remap the S key code 83 to any other key.
You can lookup a keycode on this website for example: http://keycode.info/

Just a temporary solution, but hopefully it will help someone like me until it get addressed in the future release.

@arkadiyasuratov commented on GitHub (Sep 15, 2017): Can confirm. The issue is still present in the current beta `v0.18`. Would be nice to be able to remap the key in the settings panel or just be able to turn off this particular shortcut. Qucik and ugly way to solve it, is by editing the file [`common.js`](https://github.com/BookStackApp/BookStack/blob/release/public/js/common.js) in `public/js/` directory. Just find and remove this line of code: `n.on("keydown",function(e){83===e.keyCode&&(navigator.platform.match("Mac")?e.metaKey:e.ctrlKey)&&(e.preventDefault(),t.$emit("save-draft",e))}),` [Here's the file](https://github.com/BookStackApp/BookStack/files/1305544/keymap-quickfix.zip) from version `v0.18` without the above line of code. Or you can remap the `S` key code `83` to any other key. You can lookup a keycode on this website for example: http://keycode.info/ Just a temporary solution, but hopefully it will help someone like me until it get addressed in the future release.
Author
Owner

@AbijeetP commented on GitHub (Sep 15, 2017):

@ssddanbrown - Can we add a flag in the user profile to disable shortcuts?

@AbijeetP commented on GitHub (Sep 15, 2017): @ssddanbrown - Can we add a flag in the user profile to disable shortcuts?
Author
Owner

@ssddanbrown commented on GitHub (Sep 15, 2017):

@AbijeetP I'd prefer not to have an additional setting if not required.

I think the base issue here is that event.ctrlKey = true even when ctrlKey is not pressed but AltGr is. Just need to add a check that altkey is not also pressed I think.

Marked for next bugfix release.

@ssddanbrown commented on GitHub (Sep 15, 2017): @AbijeetP I'd prefer not to have an additional setting if not required. I think the base issue here is that `event.ctrlKey = true` even when ctrlKey is not pressed but `AltGr` is. Just need to add a check that `altkey` is not also pressed I think. Marked for next bugfix release.
Author
Owner

@ssddanbrown commented on GitHub (Oct 1, 2017):

Tested and found to be fixed in current master branch. Will be release as part of v0.18.2 (Hopefully today sometime).

Will close for now but please let me know if any issues are experienced upgrading to v0.18.2 once it's released.

Thanks for reporting.

@ssddanbrown commented on GitHub (Oct 1, 2017): Tested and found to be fixed in current master branch. Will be release as part of v0.18.2 (Hopefully today sometime). Will close for now but please let me know if any issues are experienced upgrading to v0.18.2 once it's released. Thanks for reporting.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#286