Re: Accelerator keys cross-platform

Kevin Walzer <[email protected]>
Newsgroups gmane.comp.python.tkinter
Organization WordTech Communications LLC
Message-ID <[email protected]>
Mick,

On 12/26/15 2:57 AM, Michael O'Donnell wrote:
> Hi Kevin,
>
> I initially do:
>
>          if sys.platform == "darwin": CmdKey="Command-"
>          else: CmdKey="Control-"
>
> ...and then I define menu items as:
>
>          myMenu.add_command(label="Quit", command=self.mainWin.Quit,
> accelerator=CmdKey+'Q')
>
>
Thanks!

How do you handle other keybindings, c.f.

window.bind('<Command-or-control-W'>, lambda event: window.hide())

?

--Kevin

-- 
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.