Keypress events!

We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules
Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
Post Reply
soltanivahid
Senior Boarder
Senior Boarder
Posts: 58
Joined: Thu Jan 04, 2018 8:22 pm

Keypress events!

Post by soltanivahid » Sat Nov 24, 2018 3:51 pm

Hello
I want to disable ctrl+z while in renaming!
I see you have done something in code but dosnt work!
What is your solution!

jllort
Moderator
Moderator
Posts: 10501
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Keypress events!

Post by jllort » Sun Nov 25, 2018 9:40 pm

What is the problem with CTRL+Z ?

soltanivahid
Senior Boarder
Senior Boarder
Posts: 58
Joined: Thu Jan 04, 2018 8:22 pm

Re: Keypress events!

Post by soltanivahid » Mon Nov 26, 2018 7:20 pm

I want to disable it while user is writing something any where.
Thanks

jllort
Moderator
Moderator
Posts: 10501
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Keypress events!

Post by jllort » Sat Dec 01, 2018 11:06 am

I suggest using the methods disableKeyShorcuts() and enableKeyShorcuts(), a good class to watch the implementation might be KeywordsPopup.java, if you understood how is used there you should success in use in rename.

https://github.com/openkm/document-mana ... Popup.java

soltanivahid
Senior Boarder
Senior Boarder
Posts: 58
Joined: Thu Jan 04, 2018 8:22 pm

Re: Keypress events!

Post by soltanivahid » Sat Dec 01, 2018 7:31 pm

Disable key shurtcut dosnt work!

jllort
Moderator
Moderator
Posts: 10501
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Keypress events!

Post by jllort » Sun Dec 02, 2018 6:50 pm

Are you sure about the disable shortcuts method has really executed ( put some Window.alert )?
Did you make a fork of OpenKM source code? that is a good practice to compare and build your changes from our side.

soltanivahid
Senior Boarder
Senior Boarder
Posts: 58
Joined: Thu Jan 04, 2018 8:22 pm

Re: Keypress events!

Post by soltanivahid » Mon Dec 03, 2018 2:44 pm

Yes im sure.
Try i while renaming a document, press ctrl+z in renaming and debug windows appear!

jllort
Moderator
Moderator
Posts: 10501
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Keypress events!

Post by jllort » Thu Dec 06, 2018 11:30 am

In the extendedDocPanel comment the line
dockPanel.sinkEvents(Event.KEYEVENTS); // all the shortcuts should be disabled and then check the code. If that works I suggest uncomment and check the disableKeyShortcuts and ensure the enableKeyShorcuts is not called from other after you have called disableKeyShorcuts

disableKeyShorcuts() should make the same, at least you will check if the problems come from there, seems in your case is not working ?

soltanivahid
Senior Boarder
Senior Boarder
Posts: 58
Joined: Thu Jan 04, 2018 8:22 pm

Re: Keypress events!

Post by soltanivahid » Thu Dec 06, 2018 8:26 pm

Have you tested it with okm professional? Is it working there?? Please test: while renaming press ctrl+z

jllort
Moderator
Moderator
Posts: 10501
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Keypress events!

Post by jllort » Wed Dec 12, 2018 7:16 pm

In the professional version, we have the option to change CTRL+Z to another shortcut from profiles. I think that feature was introduced for an issue with a German keyboard. Unfortunately, these changes have still not promoted into the community edition.
support_558.png
support_558.png (15.21 KiB) Viewed 906 times
An option might change CTRL+Z in your the code for a shortcut like CTRL+SHIFT+Z, or make this keyword configurable in a similar manner we have done in the professional edition.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests