XBoard for Mac: failure to edit
From the main menu: Engine -> Edit Engine List...
Selecting a line of text in the engine list window and copying it with cmd-C does not copy the text but instead copies the current game. While this may have been intentional, it is certainly not intuitive.
There doesn't seem to be any way to copy the window text other than to dig down into the application package directory and directly edit the engine list configuration file.
XBoard for Mac: failure to edit
Moderators: hgm, Dann Corbit, Harvey Williamson
-
hgm
- Posts: 27703
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: XBoard for Mac: failure to edit
No, this is not intentional. And apparently an OSX-specific problem, as in the Linux version Ctrl-C works fine to copy the selected text to the clipboard. Ctrl-C is also a menu accelerator for 'Copy Game', but this is only working when the board window has focus, not when one of the auxiliary windows has focus.
I suppose it has something to do with this gtkosx_integration library. In particular that the menu bar of the main window appears at the top of the desktop, rather than inside of the window. This might have the unintended effect that it intercepts keystrokes that are really intended for another window as if they were menu accelerators.
I have no Mac, so I cannot test anything for this. Does the menu bar stay up when the Edit Engine List dialog appears, and you are working in it?
I suppose it has something to do with this gtkosx_integration library. In particular that the menu bar of the main window appears at the top of the desktop, rather than inside of the window. This might have the unintended effect that it intercepts keystrokes that are really intended for another window as if they were menu accelerators.
I have no Mac, so I cannot test anything for this. Does the menu bar stay up when the Edit Engine List dialog appears, and you are working in it?
-
MikeB
- Posts: 4889
- Joined: Thu Mar 09, 2006 6:34 am
- Location: Pen Argyl, Pennsylvania
Re: XBoard for Mac: failure to edit
Correct.hgm wrote:No, this is not intentional. And apparently an OSX-specific problem, as in the Linux version Ctrl-C works fine to copy the selected text to the clipboard. Ctrl-C is also a menu accelerator for 'Copy Game', but this is only working when the board window has focus, not when one of the auxiliary windows has focus.
I suppose it has something to do with this gtkosx_integration library. In particular that the menu bar of the main window appears at the top of the desktop, rather than inside of the window. This might have the unintended effect that it intercepts keystrokes that are really intended for another window as if they were menu accelerators.
I have no Mac, so I cannot test anything for this. Does the menu bar stay up when the Edit Engine List dialog appears, and you are working in it?
-
JoshPettus
- Posts: 730
- Joined: Fri Oct 19, 2012 2:23 am
Re: XBoard for Mac: failure to edit
I wonder for the osx version, if we could reserve cmd(meta)-c/cmd-v for copy/paste off of the clipboard and ctrl-c/ctrl-v for copy game.
-
hgm
- Posts: 27703
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: XBoard for Mac: failure to edit
Well, if OS X cannot dispatch keystrokes to the window they are intended for, we obviously should not use any accelerator keys for menu items that are needed in the other windows (for editing text widgets there). So we should take an inventory of the keystrokes necessary for editing (select, copy, paste, arrow navigation), and see where they collide with our current accelerator keys.
This might also reflect upon the accessible version, which uses plain Arrow keys to move a 'board cursor' for selecting pieces. I am not sure if they are defined as accelerators, but if they are, they would probably also make the dialogs 'deaf' to the Arrow keys.
There might be an alternative: in principle anything you type when the board window has focus will cause a keyboard event for that window (which we now use to pop up the move-input box, and put the character there, if the character is printable). In principle we could intercept the Cmd-C there, and have it call the corresponding menu handler, rather than instructing the OS to do that. It would not automatically mention the accelerator in the pull-down menu then, however.
This might also reflect upon the accessible version, which uses plain Arrow keys to move a 'board cursor' for selecting pieces. I am not sure if they are defined as accelerators, but if they are, they would probably also make the dialogs 'deaf' to the Arrow keys.
There might be an alternative: in principle anything you type when the board window has focus will cause a keyboard event for that window (which we now use to pop up the move-input box, and put the character there, if the character is printable). In principle we could intercept the Cmd-C there, and have it call the corresponding menu handler, rather than instructing the OS to do that. It would not automatically mention the accelerator in the pull-down menu then, however.
-
JoshPettus
- Posts: 730
- Joined: Fri Oct 19, 2012 2:23 am
Re: XBoard for Mac: failure to edit
It is tricky. You are correct about the focused window receiving key strokes. So that is an option. Arrow keys appear to work fine in menus, eg the Load Engine dialog to move the highlighted item in the list. the menu accelerators that use arrow keys also use the alt modifier.
