Skip to content

Commit

Permalink
Bind copy paste on Mac to cmd instead of ctrl
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaeuerle committed Apr 22, 2020
1 parent 8268e8a commit 066f376
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/main/java/at/laborg/briss/gui/MergedPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.InputEvent;
Expand Down Expand Up @@ -517,12 +518,12 @@ private class MergedPanelKeyAdapter extends KeyAdapter {
public void keyPressed(KeyEvent e) {
switch (e.getKeyCode()) {
case KeyEvent.VK_C:
if (e.getModifiersEx() == InputEvent.CTRL_DOWN_MASK) {
if (e.getModifiersEx() == Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx()) {
copyToClipBoard();
}
break;
case KeyEvent.VK_V:
if (e.getModifiersEx() == InputEvent.CTRL_DOWN_MASK) {
if (e.getModifiersEx() == Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx()) {
pasteFromClipBoard();
}
break;
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/help.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ <h3>Handle crop rectangles</h3>
"Delete rectangle"
</li>
<li>You can <b>move</b> crop rectangles around by clicking and
holding the left mousebutton in a crop rectangle!
holding the left mouse button in a crop rectangle!
</li>
<li>You can copy and paste a rectangle between different page
clusters. Therefore you must select some crop rectangles. Afterwards
press ctrl+c, then click into the page cluster where you want to paste
the selected crop rectangles and paste them by pressing ctrl+v.</li>
press &lt;ctrl&gt;+c (&lt;cmd&gt;+c on Mac), then click into the page cluster where you want to paste
the selected crop rectangles and paste them by pressing &lt;ctrl&gt;+v (&lt;cmd&gt;+v on Mac).</li>
<li>Various other self describing actions are available through the <span style="font-family: monospace">Action-</span> menu.</li>
</ul>
<h3>Command line usage</h3>
Expand All @@ -50,4 +50,4 @@ <h3>Command line usage</h3>
</pre>
<p>the second line will crop the file into
<pre>dogeatdog_cropped.pdf</pre>
</p>
</p>

0 comments on commit 066f376

Please sign in to comment.