[Python-bugs-list] [ python-Bugs-768469 ] Alt key doesn't work in IDLE for MacOSX

SourceForge.net noreply@sourceforge.net
Mon, 14 Jul 2003 13:39:25 -0700


Bugs item #768469, was opened at 2003-07-09 13:49
Message generated for change (Comment added) made by tiagoh
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=768469&group_id=5470

Category: IDLE
Group: Python 2.3
Status: Open
Resolution: None
Priority: 7
Submitted By: Tiago Castro Henriques (tiagoh)
Assigned to: Kurt B. Kaiser (kbk)
Summary: Alt key doesn't work in IDLE for MacOSX

Initial Comment:
I'm running IDLE under MacOSX 10.2.6 using Python 2.3b2.

Using Apple's X11 beta 3 version, I am unable to access
any of the shortcuts that use the Alt key, including
the history keystrokes that recall past commands.

In my configuration at least, the Alt key is being used
(as usual) to access special characters and accented
characters.

Is there any way to bypass this, allowing the Alt key
to be handled directly by IDLE?

----------------------------------------------------------------------

>Comment By: Tiago Castro Henriques (tiagoh)
Date: 2003-07-14 20:39

Message:
Logged In: YES 
user_id=819035

File attachment doesn't seem to be working for me using
Mozilla Firebird. Here is the tentative [IDLE Modern] key
binding scheme, ordered by virtual event name:

[IDLE Modern]
beginning-of-line=<Key-Home>
center-insert=<Control-Key-t>
change-indentwidth=<Control-Key-7>
close-all-windows=<Control-Key-q>
close-window=<Control-Key-w>
comment-region=<Control-Key-3>
copy=<Control-Key-c>
cut=<Control-Key-x>
dedent-region=<Control-Key-1>
do-nothing=<Control-Key-F12>
end-of-file=<Control-Key-d>
find-again=<Control-Key-g>
find-in-files=<Control-Key-k>
find-selection=<Control-Key-j>
find=<Control-Key-f>
goto-line=<Control-Key-l>
history-next=<Control-Key-Down>
history-previous=<Control-Key-Up>
indent-region=<Control-Key-2>
interrupt-execution=<Control-Key-i>
newline-and-indent=<Key-Return> <Key-KP_Enter>
open-class-browser=<Control-Key-b>
open-module=<Control-Key-m>
open-new-window=<Control-Key-n>
open-window-from-file=<Control-Key-o>
paste=<Control-Key-v>
plain-newline-and-indent=<Control-Key-u>
print-window=<Control-Key-p>
python-context-help=<Control-Key-F1>
python-docs=<Key-F1>
redo=<Control-Key-y>
remove-selection=<Key-Escape>
replace=<Control-Key-h>
restart-shell=<Key-F7>
save-copy-of-window-as-file=<Control-Key-r>
save-window-as-file=<Control-Key-e>
save-window=<Control-Key-s>
select-all=<Control-Key-a>
smart-backspace=<Key-BackSpace>
smart-indent=<Key-Tab>
tabify-region=<Control-Key-5>
toggle-auto-coloring=<Control-Key-9>
toggle-tabs=<Control-Key-8>
uncomment-region=<Control-Key-4>
undo=<Control-Key-z>
untabify-region=<Control-Key-6>
view-restart=<Key-F6>


----------------------------------------------------------------------

Comment By: Tiago Castro Henriques (tiagoh)
Date: 2003-07-14 20:28

Message:
Logged In: YES 
user_id=819035

Proposal for new key binding scheme
===================================

Problem
-------

Due to several reasons discussed in my previous messages,
the 3 available key binding schemes for IDLE in MacOSX are
not satisfactory for various reasons, the main one being
that the Alt/Option modifier is preempted by MacOSX for
accented characters and symbols, and the Command/Apple
modifier is preempted by X11 for several shortcuts.

Considering that IDLE is supposed to be a tool for beginners
as well as for more advanced programmers, the key binding
scheme for Windows (which is currently the default scheme)
also has a few problems. Although all shortcuts in the [IDLE
Classic Windows] key binding scheme seem to work, they use
an inconsistent mix of modifier keys that hinders learning
and makes it difficult to use in platforms where modifier
keys work differently. Most of these shortcuts use the
Control and Alt modifiers, but some shortcuts use 2 or more
modifiers or a third modifier:

Control modifier:
close-all-windows=<Control-Key-q>

Alt/Meta modifier:
close-window=<Alt-Key-F4> <Meta-Key-F4>

Shift modifier:
python-context-help=<Shift-Key-F1>

Several modifiers:
redo=<Control-Shift-Key-z>
save-copy-of-window-as-file=<Alt-Shift-Key-s>

Proposal
--------

I propose to use a new key binding scheme that uses one
single modifier key for all shortcuts in order to increase
learnability and portability. The Control modifier is the
natural choice for the standard modifier, since unlike the
Alt, Command or Windows modifiers it is not usually used for
standard OS shortcuts.

I am attaching to this message my ~/.idlerc/config-keys.cfg
file containing the bindings for this scheme, which I have
tentatively named [IDLE Modern]. My hope is to have this
scheme become one of the additional schemes shipped with
IDLE, and perhaps even replace the [IDLE Classic Windows]
scheme as the default scheme for IDLE on all platforms.

Rationale
---------

I tried to preserve most bindings that have become common in
Mac, Windows and Linux applications, and change non-standard
bindings to standard. I have also changed all bindings that
use a modifier different from Control, sometimes using a
similar binding (e.g. <Control-Key-3> instead of <Alt-Key-3>
for the <<comment-region>> virtual event), sometimes using a
completely different binding.

I strived to use only alphabetical keys, numerical keys and
function keys, since other characters tend to shift
according to which keyboard layout one is using. For
instance, in the Portuguese keyboard layout the bracket
characters have to accessed using a special modifier key,
labeled AltGr (for Alt Graphics) together with a numeric key
(AltGr-Key-7 and AltGr-Key-8), while the slash character has
to be written using Shift-Key-7. This means that the
standard bindings for the <<dedent-region>>,
<<indent-region>> and <<expand-word>> virtual events are
difficult if not impossible to access with a Portuguese
keyboard layout. One possible solution, which I chose many
years ago, is to memorize the American keyboard layout and
use that layout for all programming and command-line work,
regardless of the actual labels on your keys. Although not
really that difficult, this is a step that most people will
understandably refuse to take. A more acceptable solution is
to avoid using non-alphanumeric characters, which tend to
vary a lot more from one layout to the other.

I also tried to bind semantically similar virtual events to
neighbouring keys, as is already the case with the standard
clipboard shortcuts, which occupy 3 neighbouring keys in the
same row (x, c and v). For instance, all find commands are
placed sequentially in the same row (f, g, h, j and k). All
save commands are placed in neighbouring keys (s, e and r).
The dedent and indent events are moved to the same row as 4
other events that affect a region, like comment and
uncomment (numeric keys row, 1 to 9), along with some other
events associated with tabs.

Finally, 2 of the most used virtual events, <<history-next>>
and <<history-previous>>, are now bound to
<Control-Key-Down> and <Control-Key-Up>, which should be
much more obvious than <Control-Key-n> and <Control-Key-p>.
The old bindings are hard to understand unless you have a
history of Emacs ab^H^Huse, and are not as intuitive as
using the arrows with a modifier key.

Extension bindings
------------------

The key bindings for virtual events belonging to IDLE
extensions are currently defined in config-extensions.def
and are not customizable directly from IDLE. Since 4 of
these virtual events currently use the Alt modifier, they
conflict with the above rationale of using one single
modifier key for all shortcuts, viz. the Control key. I
propose to expand these currents shortcuts with another key
bindings that fits in with the proposed [IDLE Modern] scheme:

format-paragraph=<Control-Key-0> <Alt-Key-q>
expand-word=<Control-Key-Tab> <Alt-Key-slash>
zoom-height=<Key-F2> <Alt-Key-2>
run-module=<Key-F5> # unchanged
check-module=<Key-F4> <Alt-Key-x>

Binding changes
---------------

Comparison of [IDLE Modern] bindings to [IDLE Classic
Windows] bindings:

a) Identical bindings:

beginning-of-line=<Key-Home>
close-all-windows=<Control-Key-q> # modifier-q is a standard
binding for 'quit' in Mac (increasingly used in Windows)
copy=<Control-Key-c> # modifier-c is a standard binding
'copy' in Windows and Mac
cut=<Control-Key-x> # modifier-x is a standard binding 'cut'
in Windows and Mac
do-nothing=<Control-Key-F12>
end-of-file=<Control-Key-d>
find=<Control-Key-f> # modifier-f is a standard binding for
'find' in Windows and Mac
newline-and-indent=<Key-Return>
open-new-window=<Control-Key-n> # modifier-n is a standard
binding for 'new' in Windows and Mac
open-window-from-file=<Control-Key-o> # modifier-o is a
standard binding for 'open' in Windows and Mac
paste=<Control-Key-v> # modifier-v is a standard binding for
'paste' in Windows and Mac
print-window=<Control-Key-p> # modifier-p is a standard
binding for 'print' in Windows and Mac
python-docs=<Key-F1>
remove-selection=<Key-Escape>
replace=<Control-Key-h> # modifier-h is a standard binding
for 'replace' in Windows and Mac
save-window=<Control-Key-s> # modifier-s is a standard
binding for 'save' in Windows and Mac
select-all=<Control-Key-a> # modifier-a is a standard
binding for 'select-all' in Windows and Mac
smart-backspace=<Key-BackSpace>
smart-indent=<Key-Tab>
undo=<Control-Key-z> # modifier-z is a standard binding for
'undo' in Windows and Mac
view-restart=<Key-F6>

b) Similar bindings (Alt or Meta modifier replaced with
Control modifier):

comment-region=<Control-Key-3>
open-module=<Control-Key-m>
uncomment-region=<Control-Key-4>
tabify-region=<Control-Key-5>
untabify-region=<Control-Key-6>

c) Changed bindings:

center-insert=<Control-Key-t>
change-indentwidth=<Control-Key-7>
close-window=<Control-Key-w> # modifier-w is a standard
binding for 'close-window' in Mac (increasingly used in Windows)
dedent-region=<Control-Key-1>
find-again=<Control-Key-g> # modifier-g is a standard
binding for 'find-again' in Windows and Mac
find-in-files=<Control-k>
find-selection=<Control-Key-j>
goto-line=<Control-Key-l> # modifier-l is a common but not
standard binding for 'goto-line' in Windows and Mac
history-next=<Control-Key-Down>
history-previous=<Control-Key-Up>
indent-region=<Control-Key-2>
interrupt-execution=<Control-Key-i>
open-class-browser=<Control-Key-b>
plain-newline-and-indent=<Control-u>
python-context-help=<Control-Key-F1>
redo=<Control-Key-y> # modifier-y is a common but not
standard binding for 'redo' in Windows and Mac
restart-shell=<Key-F7>
save-copy-of-window-as-file=<Control-Key-r>
save-window-as-file=<Control-Key-e>
toggle-auto-coloring=<Control-Key-9>
toggle-tabs=<Control-Key-8>

Bindings ordered by key
-----------------------

smart-backspace=<Key-BackSpace>
remove-selection=<Key-Escape>
beginning-of-line=<Key-Home>
newline-and-indent=<Key-Return> <Key-KP_Enter>
smart-indent=<Key-Tab>

python-docs=<Key-F1>
view-restart=<Key-F6>
restart-shell=<Key-F7>

python-context-help=<Control-Key-F1>
do-nothing=<Control-Key-F12>

history-previous=<Control-Key-Up>
history-next=<Control-Key-Down>

dedent-region=<Control-Key-1>
indent-region=<Control-Key-2>
comment-region=<Control-Key-3>
uncomment-region=<Control-Key-4>
tabify-region=<Control-Key-5>
untabify-region=<Control-Key-6>
change-indentwidth=<Control-Key-7>
toggle-tabs=<Control-Key-8>
toggle-auto-coloring=<Control-Key-9>

select-all=<Control-Key-a>
open-class-browser=<Control-Key-b>
copy=<Control-Key-c>
end-of-file=<Control-Key-d>
save-window-as-file=<Control-Key-e>
find=<Control-Key-f>
find-again=<Control-Key-g>
replace=<Control-Key-h>
interrupt-execution=<Control-Key-i>
find-selection=<Control-Key-j>
find-in-files=<Control-Key-k>
goto-line=<Control-Key-l>
open-module=<Control-Key-m>
open-new-window=<Control-Key-n>
open-window-from-file=<Control-Key-o>
print-window=<Control-Key-p>
close-all-windows=<Control-Key-q>
save-copy-of-window-as-file=<Control-Key-r>
save-window=<Control-Key-s>
center-insert=<Control-Key-t>
plain-newline-and-indent=<Control-Key-u>
paste=<Control-Key-v>
close-window=<Control-Key-w>
cut=<Control-Key-x>
redo=<Control-Key-y>
undo=<Control-Key-z>


----------------------------------------------------------------------

Comment By: Tiago Castro Henriques (tiagoh)
Date: 2003-07-12 19:10

Message:
Logged In: YES 
user_id=819035

Thanks for the instructive comments. Here are some answers:

1) The problems are the following:

a) The standard key bindings are the IDLE Classic Windows
key bindings, which do not work.

- None of the many bindings that use the Alt modifier work,
since the Alt (a.k.a. Option) key is used in MacOSX for
accents and symbols.

b) The IDLE Classic Mac key bindings do not work.

- Most of them require the Command key, which for some
unknown reason do not seem to work.

c) The IDLE Classic Unix key bindings mostly work, but are
unsatisfactory.

- These bindings replace many "chord" key bindings with
emacs style shortcuts, which are frankly unpleasant to use
for 99% of people not used to emacs. Also, there are still
several of these Unix key bindings that use the Alt
modifier, and which thus do not work in MacOSX. In spite of
all this, it is the most usable of the 3 default schemes.


d) 5 key bindings used by extensions are currently not
rebindable: Alt-Key-q, Alt-Key-slash, Alt-Key-2, Alt-Key-x
and Key-F5. Since 4 of them use the Alt modifier, they do
not work under MacOSX

e) Some bits of extend.txt and help.txt are outdated.

2) A slightly awkward workaround to problem 1.b:

What I meant was that by replacing Command with Meta in key
bindings means that many but far from all Command bindings work.

By chance, I discovered that using the Control-Command
combination instead of just the Command modifier makes most
if not all Meta bindings work. It seems as if Meta really is
interpreted as Control-Command, with Command working sometimes.

This is not very satisfactory, but it's better than any of
the other 3 default bindings.

3) Regarding capitalization:

I discovered by accident that Tk keybindings are case
sensitive. However, all bindings mentioned by me treat
capitals and lowercase letters identically, i.e. when I
wrote Command-B, I really meant Command-b, and not
Command-Shift-b. I'll take care not make that confusion from
now on.

4) Command-b and Control-b:

The bindings mentioned in my 2003-07-11 18:48 message are
Command bindings. Command-b and Command-f really do move to
the beginning and end of words, unlike Control-b and
Control-f, which move one character back and one character
forward.

I have no idea why some these Command bindings work, but the
fact is they do.

5) It might be useful to get other MacOSX users to check my
findings, since there might quirks with my configuration
which I'm not aware of.

----------------------------------------------------------------------

Comment By: Kurt B. Kaiser (kbk)
Date: 2003-07-11 20:43

Message:
Logged In: YES 
user_id=149084

Thank you for reporting the issues with help.txt and
extend.txt.  I will update these files. You are correct
about the renaming, extend.txt has not been updated
since the new config system was implemented.

I agree it would be nice to set the extension configuration
from the configuration dialog.  However, we are much too
close to release to contemplate doing that for 2.3.  

The extension feature is intended to incorporate 3rd party
features so the enhancement of the config dialog would
have to be suitably general.

Your problem appears to be down to one thing: none of
IDLE's "Classic Mac" Command combinations in your
config-keys.def work.  If I understand you correctly, you
are saying that e.g. replacing "Command-Key-w" by
"Meta-Key-w" in config-keys.def causes the
<<close-window>> event to work correctly?  

Note that Tk is very picky about capitalization.  
"Command-Key-w" is not the same as "Command-Key-W".  
Please be sure that your file is correct in this regard.  If
you can get everything working by doing this, would you
please upload the modified version of your config-keys.def
and let me know what the remaining problems are, if any.

In your messages you have variously said that both
"Command-B" and "Ctl-b" keystrokes go to the beginning
of a word.  Is this correct?  And do you really mean
"Apple/Shift/b" in the first case?

The Ctl-b binding and others like it that you have mentioned
in your earlier message are part of a number of default
Tk bindings that have not been disabled in IDLE.

http://www.tcl.tk/man/tcl8.3/TkCmd/text.htm#M141

Clearly, there may not be complete compatibility with this
documentation in the Tk Mac implementation.  But that is
the origin of the bindings.

By the way, the way to customize is not to modify 
config-keys.def, but to modify your .idlerc/config-keys.cfg
or any of the other files in that directory.

That is what the config dialog does, and it is quite all right
to modify it manually as long as you carefully follow the 
format.


----------------------------------------------------------------------

Comment By: Tiago Castro Henriques (tiagoh)
Date: 2003-07-11 19:08

Message:
Logged In: YES 
user_id=819035

The file extend.txt references two files that do not exist:
keydefs and config.txt

I suppose the former corresponds config-keys.def, while the
latter has been split into 3 files: config-main.def,
config-extensions.def and config-highlight.def.

Is this correct?

Looking into config-extensions.def, I can finally see were
those non-standard key sequences are defined:

[FormatParagraph_cfgBindings]
format-paragraph=<Alt-Key-q>
(...)
[AutoExpand_cfgBindings]
expand-word=<Alt-Key-slash>
(...)
[ZoomHeight_cfgBindings]
zoom-height=<Alt-Key-2>
(...)
[ScriptBinding_cfgBindings]
run-module=<Key-F5>
check-module=<Alt-Key-x>

It would nice if these key bindings for extension modules
could be put in the same file as the standard key bindings.
Even nicer if the configuration dialog could be used to
change all key bindings.

----------------------------------------------------------------------

Comment By: Tiago Castro Henriques (tiagoh)
Date: 2003-07-11 18:48

Message:
Logged In: YES 
user_id=819035

Using the original [IDLE Classic Mac] shortcut keys
definitions, the only Command shortcuts that do anything are
the following:

Command-Q: tries to quit X11 instead of IDLE
Command-W: closes X11 windows instead of IDLE windows
Command-B: go to beginning of word
Command-F: go to end of word
Command-D: delete next word
Command-H: hide X11
Command-M: minimize window
Command-,: X11 preferences dialog

----------------------------------------------------------------------

Comment By: Tiago Castro Henriques (tiagoh)
Date: 2003-07-11 18:43

Message:
Logged In: YES 
user_id=819035

Sorry, my confusion. Since I edited my original
config-keys.def file, I forgot that the [IDLE Classic Mac]
shortcuts used the Command modifier, and not Alt. This
confusion is only made in my last message. If you replace
"Command" with "Alt" in that message, everything makes sense:

"""
If I change all keybinding using the Command-key in the [IDLE
Classic Mac] section of config-keys.def to use Meta instead
of Command, suddenly many of the shortcuts work using the
Command key (a.k.a Apple key).

However, it seems that those shortcuts that are already
being used by X11 take precedence:

Command-Q tries to quit X11 and not IDLE and Command-W
closes any X11 window, not just IDLE windows.

There is a simple workaround to this problem. For some
reason, if we use the Control-Command combination for Meta
instead of just the Command key, most shortcuts seem to work.
"""

----------------------------------------------------------------------

Comment By: Kurt B. Kaiser (kbk)
Date: 2003-07-11 18:22

Message:
Logged In: YES 
user_id=149084

First, I would like you to answer this question:

"What Alt keybindings are in the [IDLE Classic Mac]
section of your config-keys.def and how did they
get there, since there are none in the distributed
version of that file?"

Then, please read extend.txt and review the
config-extensions.def file.  The current implementation
of the configuration dialog does not have the ability
to customize the extension keybindings.

It may be possible to provide a special version of 
config-extensions.def for the Mac.  I will investigate.

----------------------------------------------------------------------

Comment By: Tiago Castro Henriques (tiagoh)
Date: 2003-07-11 16:32

Message:
Logged In: YES 
user_id=819035

With respect to problem 2, there is an easy workaround,
although it's not the ideal solution.

If I change all keybinding using the Alt-key in the [IDLE
Classic Mac] section of config-keys.def to use Meta instead
of Alt, suddenly many of the shortcuts work using the
Command key (a.k.a Apple key).

However, it seems that those shortcuts that are already
being used by X11 take precedence:

Command-Q tries to quit X11 and not IDLE and Command-W
closes any X11 window, not just IDLE windows.

There is a simple workaround to this problem. For some
reason, if we use the Control-Command combination for Meta
instead of just the Command key, most shortcuts seem to work.

----------------------------------------------------------------------

Comment By: Tiago Castro Henriques (tiagoh)
Date: 2003-07-11 16:22

Message:
Logged In: YES 
user_id=819035

With respect to question 3 in a previous message, some
keybindings seem to be hardcoded:

<<expand-word>> command, from AutoExpand.py:
Defined somewhere as <Alt-Key-/>.

<<zoom-height>> command, from ZoomHeight.py:
Defined as <Alt-Key-2> in TreeWidget.py.

<<format-paragraph>> command, from FormatParagraph.py:
Defined somewhere as <Alt-Key-q>.

<<check-module>> and <<run-module>> commands, from
ScriptBinding.py:
Defined somewhere as <Alt-Key-x> and <Key-F5>.

Several commands from files Bindings.py, EditorWindow.py and
PyShell.py do not have any key bindings:
<<about-idle>>, <<goto-file-line>>, <<help>>,
<<open-config-dialog>>, <<open-path-browser>>,
<<open-stack-viewer>>, <<toggle-debugger>>,
<<toggle-jit-stack-viewer>>, <<open-python-shell>>,
<<clear-breakpoint-here>> and <<set-breakpoint-here>>.

It would be cool to have keybindings for some of these, and
even cooler to be able to rebind them.

----------------------------------------------------------------------

Comment By: Tiago Castro Henriques (tiagoh)
Date: 2003-07-10 19:56

Message:
Logged In: YES 
user_id=819035

With respect to item 5) in my previous message
(user-friendly dialog boxes), the Tab key can be used to
cycle between buttons, which in conjunction with the Return
key improves keyboard usability a lot.

----------------------------------------------------------------------

Comment By: Tiago Castro Henriques (tiagoh)
Date: 2003-07-10 19:51

Message:
Logged In: YES 
user_id=819035

Keeping in mind Guido's goal of releasing Python2.3 by
August 1st (so that it can be included with MacOSX 10.3), we
should strive to make IDLE more Mac-friendly before that date:

In order to do this, we have to correct a few problems:

1) IDLE for MacOSX should use the [IDLE Classic Mac] keyset
by default.

Users should not be forced discover that the key-bindings
can be changed and then having to explicitly change the
configuration. We want to attract newbies to Python, and
IDLE should be the ideal tool for that.

2) The shortcut keys should work correctly.

Currently none of the key combinations that use the
Command-key work for me, which forces me to use the mouse
and the menus. The clipboard shortcuts (Com-C, Com-X, Com-V)
do not work, and other common shortcuts (Com-S, Com-N,
Com-O, Com-W) don't work either. Com-Q works, but it tries
to exit X11 altogether, instead of closing IDLE.

I know Mac users are used to using the mouse, but
power-users are also used to having the usual Command-key
shortcuts (e.g. Command-S to save a file).

I've tried most shortcuts, and the only ones that seem to
work for me are:
remove-selection=<Key-Escape>
smart-backspace=<Key-BackSpace>
newline-and-indent=<Key-Return> <Key-KP_Enter>
smart-indent=<Key-Tab>
beginning-of-line= <Key-Home>
end-of-file=<Control-Key-d> (same as Delete key)
history-next=<Control-Key-n>
history-previous=<Control-Key-p>
interrupt-execution=<Control-Key-c>
restart-shell=<Control-Key-F6>
comment-region=<Control-Key-3>
uncomment-region=<Control-Key-4>
tabify-region=<Control-Key-5>
untabify-region=<Control-Key-6>
toggle-auto-coloring=<Control-Key-slash>
toggle-tabs=<Control-Key-t>
change-indentwidth=<Control-Key-u>
find-again=<Command-Key-g> <Key-F3> (only the latter works)

Some shortcuts do not seem do to anything, although I might
be mistaken since I do not know exactly what they are meant
to do:
center-insert=<Control-Key-l>
view-restart=<Key-F6>
do-nothing=<Control-Key-F12>

The End key works correctly, although there is no
end-of-line entry in the config-keys.def corresponding to
it, as there is for the Home key (beginning-of-line=
<Key-Home>).

The usual Windows shortcuts work:
Ctl-Home, Ctl-End, Ctl-Up, Ctl-Down, Ctl-Left, Ctl-Right

Some common emacs bindings work as well (I only tested the
most basic bindings):
Ctl-p, Ctl-n, Ctl-b, Ctl-f, Ctl-a, Ctl-e

3) Eliminate incorrect shortcuts from menus.

Although none of the shortcuts listed in the [IDLE Classic
Mac] section of file
/usr/local/lib/python2.3/idlelib/config-keys.def uses the
Alt key, several menus show shortcuts that use that key (and
which do not work):
- In the Python Shell window:
Edit -> Expand Word (Alt-/)
Windows -> Zoom Height (Alt-2)
- In the Editor window:
Format -> Format Paragraph (Alt-Q)
Run -> Check Module (Alt-X)

There doesn't seem to be any entry in config-keys.def
corresponding to these shortcuts.

4) The "IDLE Help" window should be updated.

Currently, it lists a few shortcuts that do not work in
MacOSX. Quoting:
"""
Command history:

	Alt-p retrieves previous command matching what you have typed
	Alt-n retrieves next
	Return while on any previous command retrieves that command
	Alt-/ (Expand word) is also useful here
"""


A help document that gives incorrect information is worse
than having no information.

5) Dialog Boxes should be keyboard friendly.

Presently I cannot use the keyboard to choose Dialog Box
buttons (Yes or No buttons, for instance). The only keys
that seem to work are Escape and Return.


6) Menus should be keyboard friendly.

The Alt-Underlined_Letter method that is used to navigate
menus in the Windows world doesn't seem to work with IDLE in
MacOSX.

Although this doesn't seem to be documented, F10 can be used
to open the first menu item, which enables us to operate
menus with the keyboard although this is not as efficient as
direct menu access.

----------------------------------------------------------------------

Comment By: Kurt B. Kaiser (kbk)
Date: 2003-07-10 16:42

Message:
Logged In: YES 
user_id=149084

The "Classic Mac" keyset uses Control-Key-n for
history-next and Control-Key-p for history-previous.

The Alt key isn't used in this keyset.  
(The keyset is defined in config-keys.def)

Are you saying that when "Classic Mac" is set that
Alt key accelerators are appearing in the menus?

----------------------------------------------------------------------

Comment By: Tiago Castro Henriques (tiagoh)
Date: 2003-07-10 13:52

Message:
Logged In: YES 
user_id=819035

I've tried all three of the Built-in key sets, and the
problem remains. I tried restarting idle to see if that was
the problem, but I still have the same problem. Maybe there
is something I'm missing, but it doesn't seem obvious to me
how to make it work.

Unless I'm doing something stupid, this would be a serious
defect with respect to IDLE usability under MacOSX

----------------------------------------------------------------------

Comment By: Kurt B. Kaiser (kbk)
Date: 2003-07-10 05:25

Message:
Logged In: YES 
user_id=149084

It sounds to me like you don't have the Mac bindings
enabled.  Try 
Options / Configure IDLE / Keys
and select the IDLE Classic Mac Key Set

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=768469&group_id=5470