Browse Source

Add CTRL_A support for Windows

doc-issue-template
MrS0m30n3 9 years ago
parent
commit
741daa5afb
1 changed files with 11 additions and 0 deletions
  1. 11
      youtube_dl_gui/mainframe.py

11
youtube_dl_gui/mainframe.py

@ -6,6 +6,7 @@
from __future__ import unicode_literals
import gettext
from os import name as os_name
import wx
from wx.lib.pubsub import setuparg1
@ -218,6 +219,16 @@ class MainFrame(wx.Frame):
textctrl.Bind(wx.EVT_TEXT_PASTE, event_handler)
textctrl.Bind(wx.EVT_MIDDLE_DOWN, event_handler)
if os_name == 'nt':
# Enable CTRL+A on Windows
def win_ctrla_eventhandler(event):
if event.GetKeyCode() == wx.WXK_CONTROL_A:
event.GetEventObject().SelectAll()
event.Skip()
textctrl.Bind(wx.EVT_CHAR, win_ctrla_eventhandler)
return textctrl
def _create_button(self, label, event_handler=None):

Loading…
Cancel
Save