MacOS X: how to access the "Do Refactor" button with the keyboard.

Ex: Rename a method - Shift-F6 - , with Preview enabled.
Question: On MacOS X, when there is a preview window, how can I
''click'' on its /Do Refactor/ button with the keyboard?
I tried all the ]]> combinations, to no avail.

Alain

18 comments
Comment actions Permalink

oops, thats windows, on my mac i can't figure it out either only cancel has a mnemonic.

0
Comment actions Permalink

Please see http://www.intellij.net/tracker/idea/viewSCR?publicId=21037

This is an old bug that has been "fixed" in a very special way :(

Best,

Dirk Dittert

0
Comment actions Permalink

Dirk Dittert wrote:

Please see http://www.intellij.net/tracker/idea/viewSCR?publicId=21037

This is an old bug that has been "fixed" in a very special way :(

Best,

Dirk Dittert

Dirk,
do you have any ideas on how this should be fixed having in mind mnemonics are not allowed on Mac?

--
Maxim Shafirov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

From my own experience: I choose "Do Refactor" more frequently than cancel.

Solution 1:
Right now, the focus stays in the editor. If I switch with Apple-3 to the find window, the tree view acquires the focus. You could change that such that both buttons get the focus:

You could give the focus to the "Do Refactor" button (and make it default button) so that it can be triggered by pressing space. Aborting could be done with ESC or by using the mouse (Behaviour suggested by Apple HIG, p. 58 for "Full Keyboard Access Mode").

Solution 2:
Add Altd as shortcut for "Do refactor" but do not insert weird delta-characters into the editor. This would be consistent with the Cancel button (Altc cancels the refactoring!). Maybe you could add an info text next to the buttons that explains which shortcuts to use or you could use Mnemnonics.

Solution 3:
Use Full Keyboard Access mode for that type of panes: The tree gets the focus (as it does right now) but Tab selects the "Do Refactor" button, another Tab selects the "Cancel" button)


I'd prefer solution 2, although it is not the native OS X behaviour. The refactoring dialog is a crucial feature and therefore it makes sense to have it fully keyboard accessible. By the way, that is what I wanted to have with my original bug report: not to remove the keyboard shortcut but the delta character that gets inserted ;)

Best,

Dirk Dittert

0
Comment actions Permalink

Here is another solution:

If i recall correctly, I don't have my powerbook with me atm, if you change the default keymap to windows you will suddenly see all the mnemonics come back, you could then hack the keymap from there on as you please with mnemonics all enabled.

0
Comment actions Permalink

Andre Mermegas wrote:

Here is another solution:

If i recall correctly, I don't have my powerbook with me atm, if you change the default keymap to windows you will suddenly see all the mnemonics come back, you could then hack the keymap from there on as you please with mnemonics all enabled.

The problem is not mnemonics does not appear (they do) but native Mac apps do insert some characters via Alt+]]>
keybinding into text editor that has focus. If we disable this for IDEA editor some national keyboard layouts would stop
working. Like it would be impossible to enter in French keyboard layout that doesn't seem acceptable.

--
Maxim Shafirov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

ahh yes that makes sense, however unfortunate.

0
Comment actions Permalink

Maxim,

> The problem is not mnemonics does not appear (they do) but native Mac
> apps do insert some characters via Alt+ keybinding into text > editor that has focus. I find that this problem, and MacOS X: Alt+key shortcut also inserts key in editor/dialog field. http://www.intellij.net/tracker/idea/viewSCR?publicId=33957 are 2 major productivity killers I read everywhere that PowerBooks are great development machine for Java, but I don't see it applying for IDEA. On Windows, I can spend a day without touching the mouse. On MacOS X, it's impossible. Is it even possible to spend 1 minute without having to use the mouse? > If we disable this for IDEA editor some national > keyboard layouts would stop working. Like it would be impossible to >]]> enter in French keyboard layout that doesn't seem acceptable.

If disabling was a user-option, I'd use it today: as the Belgian PB
keyboard sucks, I had to remap the squares and brackets symbols anyway.

As a recent switcher, I don't mind having to learn new shortcuts, but
losing the most useful and efficient ones, I find that hard to swallow.
Workarounds should be found, if there is no solution.


Alain

0
Comment actions Permalink

Maxim Shafirov (JetBrains) wrote:

The problem is not mnemonics does not appear (they do) but native Mac
apps do insert some characters via Alt+<letter> keybinding into text
editor that has focus. If we disable this for IDEA editor some national
keyboard layouts would stop working. Like it would be impossible to
enter in French keyboard layout that doesn't seem acceptable.


How about giving us the ability to define shortcuts for OK and Cancel in
the keymap editor? That way, everybody could define shortcuts that suits
his needs.

Best,

Dirk Dittert

0
Comment actions Permalink

thats an excellent idea.

0
Comment actions Permalink

Maxim,

>.. native Mac apps do insert some characters via Alt+ keybinding > into text editor that has focus. Am I the only one to find this limitation unbearable : - we can't access menus with the keyboard ex. : we can't call "Pull member down" with L, as also inserts a parasite character - we can't toggle checkboxes with the keyboard - with can't click buttons with the keyboard > If we disable this for IDEA editor .. So, you mean you CAN disable it, at application - IDEA's - level, if you want? That would be great. That would be a MAJOR SUPER DUPER - *1 - improvement. It would solve the 3 access problems mentioned above (menu,cb,button) *1: I mean "very very big". Even if the Alt-disabling is global - all apps, not only IDEA -, I would find that acceptable. Obviously, this should be an option. > ...some national keyboard layouts would stop working. >]]> Like it would be impossible to enter in French keyboard
layout that doesn't seem acceptable.
I guess you could extend IDEA's keymapping a little, to map text/single
chars insertion to shortcuts.
If the effect is global, I guess a tool like iKey could help.


Alain

0
Comment actions Permalink

Alain,

Why not blame MacOS interface designers instead? Please read what they say about mnemonics in their developer
guidelines:
http://developer.apple.com/documentation/Java/Conceptual/Java141Development/Native_Integration/chapter_8_section_2.html#//apple_ref/doc/uid/TP30000296/BCIBDHFJ

--
Maxim Shafirov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

Maxim

> Why not blame MacOS interface designers instead? Please read what
> ..their developer guidelines:

My comment was a reaction to your previous message, that implied that
you could, if you wish, change the current Alt-key behaviour, but that
you didn't do it because there would be some drawbacks. My point is that
there are ways more advantages than drawbacks, and that what we would
get back is no luxury, but sheer and vital keyboard efficiency.

Let's forget Apple and their guidelines for a moment. After all, they
are as capable as the other guy to make poor decisions (don't start me
on the 1-button mouse. And the PB keyboard; it sucks: no 'home', no
'end', no 'del', no 'Ins', no 'page up/down', the 4-hour battery that
last only 2, etc..).
And I didn't event mention the general absence of menu mnemonics (that
you chose to ignore, btw - GOOD -, by offering the same look as in
Windows, but that we can't use - BAAD - because of the Alt-key problem).

Apple's guidelines motivation is to (sic):
"provide the absolute best user experience on just one platform"
AFAIK, IDEA's goal is to
provide the absolute best developer experience, in one tool.
You call that:
"Develop with pleasure"
There is no pleasure when I can't use the refactoring menu - !!! -
without reaching for the mouse. You may be surprised, but I use
refactoring a lot, when working with IDEA.

Look at your audience: people develop ping applications in java, most on
Windows, some on MacOS. It's a wild guess, but I guess many MacOS
developer test/develop their apps on many platform (like you are). Don't
you think it's more important to offer a coherent experience/behaviour,
on all platforms, than to obey some Apple's guidelines.

The mouse should be an option, and on MacOS, it is not. I want my
pleasure back.

Alain

0
Comment actions Permalink

Has anybody submitted an issue in Tracker about this? I would like to give my vote for it.

0
Comment actions Permalink

Markus Halttunen wrote:

>Has anybody submitted an issue in Tracker about this? I would like to give my vote for it.

>

AFAIK, there is no such issue in the tracker.
As I didn't succeed in convincing Maxim, I suggest you give it another
try/post a request, with your words, and your ideas.

Alain

0
Comment actions Permalink

Alain Ravet wrote:

Markus Halttunen wrote:

>> Has anybody submitted an issue in Tracker about this? I would like to
>> give my vote for it.
>>


AFAIK, there is no such issue in the tracker.
As I didn't succeed in convincing Maxim, I suggest you give it another
try/post a request, with your words, and your ideas.

Alain

Not you haven't been able to convince me actually. As I do my development on a mac myself I also get angry with being
unable to work using keyboard only. The problem is I see no way to implement that stuff easily for the moment.

--
Maxim Shafirov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

I think Dirk Dittert already suggested rather good ways to overcome this problem:

From my own experience: I choose "Do Refactor" more frequently than cancel.

-- cut cut--
Solution 1:
Right now, the focus stays in the editor. If I switch with Apple-3 to the find window, the tree view acquires the focus. You could change that such that both buttons get the focus:

You could give the focus to the "Do Refactor" button (and make it default button) so that it can be triggered by pressing space. Aborting could be done with ESC or by using the mouse (Behaviour suggested by Apple HIG, p. 58 for "Full Keyboard Access Mode").

Solution 2:
Add Altd as shortcut for "Do refactor" but do not insert weird delta-characters into the editor. This would be consistent with the Cancel button (Altc cancels the refactoring!). Maybe you could add an info text next to the buttons that explains which shortcuts to use or you could use Mnemnonics.

Solution 3:
Use Full Keyboard Access mode for that type of panes: The tree gets the focus (as it does right now) but Tab selects the "Do Refactor" button, another Tab selects the "Cancel" button)
-- cut cut --

For the solution one, the "Do Refactor" could also be triggered by action + enter as it is used in many applications. But still, I also find the solution 2 the best. Mostly because it seems to me to be the easiest to implement also. Correct me if I'm wrong, but doesn't the alt-c already work for cancelling the refactoring. How difficult can it be to have alt-r or alt-d to do the refactoring? Already IDEA shows the alt-c as a mnemonic.

As somebody already suggested, couldn't it be an option to disable the alt+key based characters? But as funny as it sounds, even if I would get a ® character on the editor when I say "refactor", it would be better than to have to use the mouse. :)

0

Please sign in to leave a comment.