Skip to content

Commit

Permalink
handle Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx() error a…
Browse files Browse the repository at this point in the history
…nd set control as default key
  • Loading branch information
Quitten committed Apr 11, 2023
1 parent e9b97a2 commit 127b996
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions gui/tabs.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,12 @@ def draw(self):
sendRequestMenu2.addActionListener(SendRequestRepeater(self._extender, self._extender._callbacks, False))

# Define the key combination for the shortcut

# The keystroke combo is: Mac -> Command + r / Windows control + r
# This is used to send to the repeater function in burp
controlR = KeyStroke.getKeyStroke(KeyEvent.VK_R, Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx())
try:
# The keystroke combo is: Mac -> Command + r / Windows control + r
# This is used to send to the repeater function in burp
controlR = KeyStroke.getKeyStroke(KeyEvent.VK_R, Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx())
except:
controlR = KeyStroke.getKeyStroke(KeyEvent.VK_R, InputEvent.CTRL_DOWN_MASK)

# The keystroke combo is: Mac -> Command + c / Windows control + c
# This is used to copy the URL to the keyboard.
Expand Down

0 comments on commit 127b996

Please sign in to comment.