dbeaver icon indicating copy to clipboard operation
dbeaver copied to clipboard

Mac Editor: Problem with POS1/END key

Open MeboGit opened this issue 5 years ago • 103 comments

• Operating system (distribution) and version MacOS 10.15.5 • DBeaver version Version 7.1.2.202007051953 • Database name and version 10.4.12-MariaDB-1:10.4.12+maria~buster-log

Mac Editor: Problem with POS1/END key

Bildschirmfoto 2020-07-30 um 23 00 06

I configured key POS1 to Line Start and key END to Line End (because cross platform). That works ok for about 5 - 10 minutes editing. After that key POS1/END switches to Text Start/Text END even though "Show key binding when command is invoked/Through keyboard" shows "Line Start" but executes "Text Start" (see picture).

The problem is I can not reproduce it with some special combination of keys entered. It just happens after some minutes of editing.

It's not a big thing but it is really annoying since I have to restart IDE every time this happens because I need those keys.

System information:

  • Operating system (distribution) and version
  • DBeaver version
  • Java version
  • Additional extensions

Connection specification:

  • Database name and version
  • Driver name
  • Do you use tunnels or proxies (SSH, SOCKS, etc)?

Describe the problem you're observing:

Steps to reproduce, if exist:

Include any warning/errors/backtraces from the logs

MeboGit avatar Jul 30 '20 21:07 MeboGit

Also CTRL-S on Windows seems not to work even though it shows the hint "CTRL-S Apply Changes". Only save via menu works...

And further more: Pasting the following phrase (including leading blanks) into the editor results in some missing characters (Mac and Windows)

    '"date":', '"', date, '"', ',' 

MeboGit avatar Jul 31 '20 16:07 MeboGit

Sorry for the long response. Are described issues still actual for you?

  1. '"date":', '"', date, '"', ',' - SQL Editor transforms this statement, you can undo it clicking the popup in the lower right corner (it appears after inserting)
  2. Command+S - is correct command for Mac. You can see and change keys in Window>Preferences>General>Keys Screenshot 2020-10-08 at 13 41 21

kseniiaguzeeva avatar Oct 08 '20 10:10 kseniiaguzeeva

Thanks for your response.

  1. Ok, that is a workaround

  2. I did not change those keys, also in Windows/File/Save there it shows Ctrl-S for saving sql-script, but it does not save! image It shows "apply changes" in the hint but the file is not saved (there is still a star in the tab caption)

  3. Any idea about my main issue (POS1/END-Key) on Mac? This issue makes it impossible for me to use DBeaver on Mac!

Seems to be general issue with keys. It shows the wright keys/function in the Hint-Windows but does not execute those?!

Thanks and regards

Mebo

MeboGit avatar Oct 18 '20 21:10 MeboGit

When removing "Save Ctrl-S" and reassign then it works for some time: image

But after some editing Ctrl-S changes into "Apply changes". Also POS1/END-Keys gets lost after some editing.

MeboGit avatar Oct 18 '20 21:10 MeboGit

Sorry for the long response. 1 great 2 By default Ctrl+S works as apply changes in Data Editor and ResultSet of SQL Editor. If you want to save SQL Script in SQL Editor field, you use CMD+S, because it is different editor with different shortcut. Can it be that Save and Apply changes appear in hint depending on where you press it - in Data Editor/ResultSet of SQL Editor or in SQL Editor query field? 3 I cannot reproduce the issue with text/line start/end. Is it possible to record a gif? What keyboard and locale do you use?

kseniiaguzeeva avatar Oct 21 '20 20:10 kseniiaguzeeva

  1. As mentioned in my previous replies DBeaver/Win executes "Ctrl+S - Save" (see hint window that comes from DBeaver, "Preferences/Keys/Show key binding when command ist invoked") when I press Ctrl+S after a new Start of DBeaver. But after some time (maybe 20 minutes) suddenly "Ctrl+S - Apply changes" is executed when I press Ctrl+S. In Windows this problem is not that big because I can still use File-Menu/Save. But anyhow I still lost some scripting because of this Bug.
  2. Yes, I also cannot reproduce this issue with DBeaver/Mac. It also happens after some time (20 to 60 minutes), maybe after some specific combination of keys/shortcuts (I'm using Ctrl-Enter (execute current statement) very often, maybe there is some problem with that)?! But the problem with this is when I'm working in line 3000 and every time I press POS1 and it jumps to line 1 instead of beginning of current line that is annoying. And after having to restart every time this happened I now avoid using DBeaver for Mac.

There seems to be some problem with DBeaver key/shortcut/combination of keys/shortcuts interpretation. I'm using DBeaver on Mac/Parallels/Win, maybe DBeaver hast a problem with this?! But then again DBeaver would be the only program I'm having this issue.

MeboGit avatar Oct 21 '20 20:10 MeboGit

I now only work with the Windows-Version, I cannot work with the Mac-Version because of that POS1/END issue. I'm using a Windows QWERTZ keyboard with german layout on Macbook Pro/Parallels/Windows. I wouldn't now how to make a gif about that?!

On a gif you would see:

  1. start DBeaver on Mac
  2. Press POS
  3. Cursor jumps to beginning of current line -> Ok ...some scripting time later (without editing preferences or anything)...
  4. Press POS
  5. Cursor jumps to beginning of the text/line 1 -> Bug
  6. Restart DBeaver to have the right keys again

MeboGit avatar Oct 21 '20 21:10 MeboGit

Thank you for the details. Trying to reproduce..

kseniiaguzeeva avatar Oct 22 '20 08:10 kseniiaguzeeva

POS1/END and Ctrl+S work correctly for me. Please try for example https://apps.apple.com/us/app/giphy-capture-the-gif-maker/id668208984?mt=12 to record a gif where you use them with enabled Show key binding when command is invoked. It should help us to find a reason and fix it

kseniiaguzeeva avatar Oct 23 '20 10:10 kseniiaguzeeva

Sorry for the Delay. Because I don't use the Mac-Version anymore (because of this bug) it took a little longer :-(

Here the gifs...

After doing some work in Script-Editor (POS1/END jumps to Begin/End of text): Pos1_End_Text

After restart POS1/END works as expected again: Pos1_End_Line

MeboGit avatar Dec 04 '20 22:12 MeboGit

Was this able to be reproduced after @MeboGit's example? It happens for me too; not the biggest bug in the world but when you're editing text and your cursor unexpectedly jumps to the start/end of the file, it is pretty frustrating.

For now I'll retrain my brain to use the default shortcuts rather than customized ones.

JCapriotti avatar Feb 25 '21 14:02 JCapriotti

Unfortunatelly I still cannot reproduce it. It is a bad bug and I appreciate your help. Am I right, that you changed default shortcuts on custom ones and faced the issue?

kseniiaguzeeva avatar Feb 26 '21 15:02 kseniiaguzeeva

Shortcuts are defined as follows:

image

MeboGit avatar Mar 03 '21 19:03 MeboGit

Just to mention that I use v21.0.1.202103211229 now, on Big Sure, and do the exact same setup as described, and get the exact same result... I am getting nuts with it, always jumping to begin end of the page, very frustrating !

Tekka90 avatar Mar 30 '21 14:03 Tekka90

same issue here for HOME/END buttons for go to line start/end. DBeaver Version 21.0.2.202104042040 on Catalina version 10.15.7. restart DBeaver fixes it, but issue comes back after sometime.

hfcheng66 avatar Apr 07 '21 23:04 hfcheng66

same issue here for HOME/END buttons for go to line start/end. DBeaver Version 21.0.2.202104042040 on Big Sur version 11.2.3 restart DBeaver fixes it, but issue comes back after sometime.

DustinMeldrumRoot avatar Apr 15 '21 18:04 DustinMeldrumRoot

I have the same issue. Remapped the HOME/END buttons but stops working after a few minutes. A restart fixes it (for a short while). The current version I use is 21.0.4.202105021514 on Big Sur but it has been an issue for me since I started using DBeaver and that is already a few years now.

phildebrand avatar May 18 '21 14:05 phildebrand

I still cannot reproduce it with 3 different keyboards (I also tried to reproduce it in standalone DBeaver and in Eclipse). I've found a couple of articles where people forced the same issue and managed it. Could you please try their workarounds to solve the problem http://www.evansweb.info/2005/03/24/mac-os-x-and-home-end-keys/ and https://apple.stackexchange.com/questions/16135/remap-home-and-end-to-beginning-and-end-of-line? I'll really appreciate any feedback on this and hope that a solution will be found soon.

kseniiaguzeeva avatar Jun 08 '21 07:06 kseniiaguzeeva

I have those config in the file DefaultKeyBinding.dict. This issue still happens.

atjshop avatar Jun 09 '21 00:06 atjshop

I have those config in the file DefaultKeyBinding.dict. This issue still happens.

Same here. It wouldn't have been an issue if eclipse/dbeaver would have taken over those settings.

phildebrand avatar Jun 10 '21 07:06 phildebrand

Same here. It works initially but after some time it then jumps to beginning / end of document. So frustrating. I also have the configs mentioned in the workarounds and they works for other apps like VS Code, Word, etc... just not in dbeaver.

andrew-dixon avatar Aug 11 '21 10:08 andrew-dixon

@MeboGit @andrew-dixon @phildebrand @atjshop @Tekka90 Ok, it looks like I found where this issue can be. It still was not reproducible for me, but I noticed that after you edit custom key binds for Line start and Line end as HOME/END those bindings are still present for Text start and Text end which doesn't actually make sense. So as temporary workaround you need to manually disable or change keybinds for Text start and Text end while we must try to fix it so those keybinds would disable automatically

Matvey16 avatar Sep 07 '21 06:09 Matvey16

@Matvey16 I noticed that as well when I was looking as to why it wasn't working and disabled them but it makes no difference.

Screenshot 2021-09-07 at 08 09 58

Screenshot 2021-09-07 at 08 09 37

andrew-dixon avatar Sep 07 '21 07:09 andrew-dixon

@andrew-dixon even with those disabled after some time HOME button brings a caret to a start of the document?

Matvey16 avatar Sep 07 '21 07:09 Matvey16

@Matvey16 Yes, if I leave DBeaver open, which I tend to do most of the time as I come back to it often to do something in the DB, it will start going to the start/end of the document instead of start and end of the line. There doesn't seem to be anything in particular you have to do to get it to do it, it only seems to be related to "time" and maybe switching windows, e.g. going to a different app(s) and coming back to DBeaver at some point later, but just opening DBeaver, switching apps and then coming back to DBeaver doesn't cause it immediately, so it is mainly a time based issue.

andrew-dixon avatar Sep 07 '21 08:09 andrew-dixon

@Matvey16 I don't think this is significant, as I'm sure it has happened quicker in the past, but it's just been almost exactly 24 hours since I opened DBeaver last and the issue just started happening.

andrew-dixon avatar Sep 08 '21 08:09 andrew-dixon

Looks like a duplicate of https://github.com/dbeaver/dbeaver/issues/4483

flambchap avatar Sep 20 '21 14:09 flambchap

same issue here for HOME/END buttons for go to line start/end. DBeaver Version 21.0.2.202104042040 on Big Sur version 11.2.3 restart DBeaver fixes it, but issue comes back after sometime.

Same problem here...

flzpenteado avatar Sep 22 '21 23:09 flzpenteado

I think I might have figured out the cause of this issue, I think it is Karabiner Elements that is the "cause" of it. Since I uninstalled Karabiner Elements about a week ago I've not had this issue. I assume that the key remapping that Karabiner is doing is somehow interfering with the remapping in DBeaver.

andrew-dixon avatar Oct 27 '21 09:10 andrew-dixon

I think I might have figured out the cause of this issue, I think it is Karabiner Elements that is the "cause" of it. Since I uninstalled Karabiner Elements about a week ago I've not had this issue. I assume that the key remapping that Karabiner is doing is somehow interfering with the remapping in DBeaver.

I'm not using Karabiner and still have the issue.

phildebrand avatar Oct 27 '21 09:10 phildebrand