Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-07

Carbon key mapping

24 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mattias Gaertner

The carbon interface now maps the Ctrl key to ssCtrl (old behavior: none) and the Cmd key to ssMeta (old: ssCtrl).

The Mac OS X key scheme was changed to support better the "Apple Human Interface Guidelines". You can get the scheme under Editor Options / Key mapping / Choose Scheme. Beware: This will replace *all* shortcuts.

See here for details:
http://wiki.lazarus.freepascal.org/Lazarus_IDE_Shortcuts

Mattias

Reply by email

Felipe Monteiro de Carvalho
to Mattias Gaertner

Hello, What is the Fn button mapped to?

I noticed one problem with the Mac OS X keys. Pressing "Fn+Arrow right" makes it go to the end of the source file instead of going to the end of the line like I am used to, and like OpenOffice does in Mac OS X.

Could that be changed?

thank you very much,

Felipe Monteiro de Carvalho

Reply by email

Felipe Monteiro de Carvalho
to Felipe Monteiro de Carvalho

Hello,

More problems. When I press "a" in the code editor, yes, just a lower case a, wierd things happen. The focus jumps to the menu. Pressing it many times saved my modifications and tryed to run my application. Using the US Internation keyboard from a MacBook

thanks

Felipe Monteiro de Carvalho

Reply by email

Mattias Gaertner
to Felipe Monteiro de Carvalho: Hello, What is the Fn button mapped to? I noticed one problem with the Mac OS X keys.…
Hello, What is the Fn button mapped to?

The OS maps it. AFAIK it is used to circumvent the limitations of laptop keyboards. For example VK_DELETE = fn+VK_BACK.

I noticed one problem with the Mac OS X keys. Pressing "Fn+Arrow right" makes it go to the end of the source file instead of going to the end of the line like I am used to, and like OpenOffice does in Mac OS X.

Fn+Arrow right = End
According to the AHIG keyboard End should jump to end of file. See Xcode, TextEdit and other native OS X text editors. Jump to eol is Cmd+End = Cmd+Fn+Right.

Could that be changed?

No, that would not be OS X like.

(Personally I agree: jump to eol is more common than eof, so eol should get the shorter shortcut)

Mattias

Reply by email

Mattias Gaertner
to Felipe Monteiro de Carvalho: More problems. When I press "a" in the code editor, yes, just a lower case a, wierd…
Show quoted text 6 lines
Hello, More problems. When I press "a" in the code editor, yes, just a lower case a, wierd things happen. The focus jumps to the menu. Pressing it many times saved my modifications and tryed to run my application. Using the US Internation keyboard from a MacBook

Pressing 'a' works here.
You can find out which key uses the shortcut 'a':

http://wiki.lazarus.freepascal.org/IDE_Window:_Editor_Options#Find_key_combination

It should show no key.

Ctrl-F2 is focusing the menu on some mac os x keyboards.

Mattias

Reply by email

Mattias Gaertner
to Mattias Gaertner
Show quoted text 19 lines
On Thu, 31 Jul 2008 14:27:13 -0300 "Felipe Monteiro de Carvalho" wrote: > Hello, > > More problems. When I press "a" in the code editor, yes, just a > lower case a, wierd things happen. The focus jumps to the menu. > Pressing it many times saved my modifications and tryed to run my > application. Using the US Internation keyboard from a MacBook Pressing 'a' works here. You can find out which key uses the shortcut 'a': http://wiki.lazarus.freepascal.org/IDE_Window:_Editor_Options#Find_key_combination It should show no key. Ctrl-F2 is focusing the menu on some mac os x keyboards.

I just saw, that many Ctrl-letter combinations are mapped by OS X. Either we can fix that or we must redefine some of the Ctrl-shortcuts.

Mattias

Reply by email

Felipe Monteiro de Carvalho
to Mattias Gaertner: On Thu, 31 Jul 2008 12:42:15 -0300 The OS maps it. AFAIK it is used to circumvent the…
Mattias Gaertner wrote
No, that would not be OS X like. (Personally I agree: jump to eol is more common than eof, so eol should get the shorter shortcut)

Ummm ... yes, it would not be what OS X proposes that we do, but the Mac guidelines are not meant to be a rigid constrainment, we should analise that in some cases their proposal is not the best solution for us, like OpenOffice did. They do use Apple+C for copy, but use END to go to the end of the line.

Now I see that Apple+arrows does this, but it annoys me that the key combinations are so different from what I am used in Windows. Using the Windows style doesn't help, because then I need to use Ctrl instead of Apple for copy+paste, which is a annoying when all programs use Apple.

Pressing 'a' works here.

Now it works here too. It seams to give problems only sometimes, still haven't found a reliable way to reproduce ...

Felipe Monteiro de Carvalho

Reply by email

Mattias Gaertner
to Felipe Monteiro de Carvalho: On Thu, Jul 31, 2008 at 2:30 PM, Mattias Gaertner Ummm ... yes, it would not be what OS X…
Show quoted text 6 lines
On Thu, Jul 31, 2008 at 2:30 PM, Mattias Gaertner wrote: > No, that would not be OS X like. > > (Personally I agree: jump to eol is more common than eof, so eol > should get the shorter shortcut)

I forgot: There is Cmd+Left/Right, so jumping to eol and eof have both 2 key shortcuts.

Show quoted text 5 lines
Ummm ... yes, it would not be what OS X proposes that we do, but the Mac guidelines are not meant to be a rigid constrainment, we should analise that in some cases their proposal is not the best solution for us, like OpenOffice did. They do use Apple+C for copy, but use END to go to the end of the line.

Of course not rigid. But the more commonly used the more rigid. Yes, it is hard for windows/linux users. But it is the same for apple users and windows shortcuts.

Show quoted text 10 lines
Now I see that Apple+arrows does this, but it annoys me that the key combinations are so different from what I am used in Windows. Using the Windows style doesn't help, because then I need to use Ctrl instead of Apple for copy+paste, which is a annoying when all programs use Apple. > Pressing 'a' works here. Now it works here too. It seams to give problems only sometimes, still haven't found a reliable way to reproduce ...

OS X knows some keyboard modes. Maybe you activated it somehow (Ctrl keys).

Mattias

Reply by email

Dominique Louis
to Mattias Gaertner: The carbon interface now maps the Ctrl key to ssCtrl (old behavior: none) and the Cmd key…

I'm not happy about the Key mapping as now it's not the same as Xcode.

It is now impossible of Cut/Copy or Paste or Find etc because the shortcut keys appear as ^+Shift+F for Find in Files for example when it should be Cmd+Shift+F like it used to be.
Or ^X for Cut does not work neither ^C for copy.

Dominique.

Mattias Gaertner wrote 13 lines
The carbon interface now maps the Ctrl key to ssCtrl (old behavior: none) and the Cmd key to ssMeta (old: ssCtrl). The Mac OS X key scheme was changed to support better the "Apple Human Interface Guidelines". You can get the scheme under Editor Options / Key mapping / Choose Scheme. Beware: This will replace *all* shortcuts. See here for details: http://wiki.lazarus.freepascal.org/Lazarus_IDE_Shortcuts Mattias

Reply by email

Mattias Gaertner
to Dominique Louis
I'm not happy about the Key mapping as now it's not the same as Xcode.

It's now more like Xcode.
But you have to load the Mac OS X key mapping in the editor options. The lazarus default key mapping is still the same for all platforms.

It is now impossible of Cut/Copy or Paste or Find etc because the shortcut keys appear as ^+Shift+F for Find in Files for example when it should be Cmd+Shift+F like it used to be.

If you mean Cut/Copy/Paste shortcuts in the designer: I fixed that in r15938.

Or ^X for Cut does not work neither ^C for copy.

Cut/Copy/Paste is Cmd+X/C/V, not Ctrl+X/C/V (Option=Ctrl).

About find in files:
AFAIK Xcode has no 'Find in Files' function, that's why I took the shortcut of 'Find in project': Shift+Cmd+F.
The ^+Shift+F does not seem to do anything under Xcode.

Mattias

Reply by email

Dominique Louis
to Mattias Gaertner

Thanks Mattias,
Loading the Mac OS X specific mapping certainly changes the menu items, but actually using those key combinations does not work. Pressing Cmd+X does not Cut.

Btw, what key is ^ on a Mac OS X MacBook?

Mattias Gaertner wrote 32 lines
On Mon, 04 Aug 2008 00:20:53 +0100 Dominique Louis wrote: > I'm not happy about the Key mapping as now it's not the same as Xcode. It's now more like Xcode. But you have to load the Mac OS X key mapping in the editor options. The lazarus default key mapping is still the same for all platforms. > It is now impossible of Cut/Copy or Paste or Find etc because the > shortcut keys appear as ^+Shift+F for Find in Files for example when > it should be Cmd+Shift+F like it used to be. If you mean Cut/Copy/Paste shortcuts in the designer: I fixed that in r15938. > Or ^X for Cut does not work neither ^C for copy. Cut/Copy/Paste is Cmd+X/C/V, not Ctrl+X/C/V (Option=Ctrl). About find in files: AFAIK Xcode has no 'Find in Files' function, that's why I took the shortcut of 'Find in project': Shift+Cmd+F. The ^+Shift+F does not seem to do anything under Xcode. >> See here for details: >> http://wiki.lazarus.freepascal.org/Lazarus_IDE_Shortcuts Mattias

Reply by email

Mattias Gaertner
to Dominique Louis
Thanks Mattias, Loading the Mac OS X specific mapping certainly changes the menu items, but actually using those key combinations does not work. Pressing Cmd+X does not Cut.

It works here in designer, source editor and all edit fields. Please try if you can grab it in the editor options / key mapping / Find Key Combination.
I tested with a Macbook us-international keyboard.

Btw, what key is ^ on a Mac OS X MacBook?

The ^ modifier is the options/ctrl key.
The arrow up is the shift and the cloverleaf is the Cmd key.

Mattias

Reply by email

Dominique Louis
to Mattias Gaertner
Mattias Gaertner wrote 18 lines
On Tue, 05 Aug 2008 02:27:33 +0100 Dominique Louis wrote: > Thanks Mattias, > Loading the Mac OS X specific mapping certainly changes the menu > items, but actually using those key combinations does not work. > Pressing Cmd+X does not Cut. It works here in designer, source editor and all edit fields. Please try if you can grab it in the editor options / key mapping / Find Key Combination. I tested with a Macbook us-international keyboard. > Btw, what key is ^ on a Mac OS X MacBook? The ^ modifier is the options/ctrl key. The arrow up is the shift and the cloverleaf is the Cmd key.

Hmm I'm not having much luck here. Using ^+F does not work when I set it to Native lazarus neither does Cmd+F when I set it to Mac OS X inside the Keymapping screen.

Find Key Combination correctly detects the keys being pressed, but does not actually find the the Key combination in the dropdown list. For example if I press Cmd+F in the key combination screen the drop down list shows "Word('232')" while the Meta check box is ticked.

Inside the IDE I can't press return anymore to create new line. All other keys work. It's very strange.

Dominique.

Reply by email

Mattias Gaertner
to Dominique Louis
Show quoted text 28 lines
Mattias Gaertner wrote: > On Tue, 05 Aug 2008 02:27:33 +0100 > Dominique Louis wrote: > >> Thanks Mattias, >> Loading the Mac OS X specific mapping certainly changes the >> menu items, but actually using those key combinations does not >> work. Pressing Cmd+X does not Cut. > > It works here in designer, source editor and all edit fields. > Please try if you can grab it in the editor options / key mapping / > Find Key Combination. > I tested with a Macbook us-international keyboard. > > >> Btw, what key is ^ on a Mac OS X MacBook? > > The ^ modifier is the options/ctrl key. > The arrow up is the shift and the cloverleaf is the Cmd key. Hmm I'm not having much luck here. Using ^+F does not work when I set it to Native lazarus neither does Cmd+F when I set it to Mac OS X inside the Keymapping screen. Find Key Combination correctly detects the keys being pressed, but does not actually find the the Key combination in the dropdown list. For example if I press Cmd+F in the key combination screen the drop down list shows "Word('232')" while the Meta check box is ticked.

232 means that the character is not an F, but an unknown character. I got the same. I fixed that on sunday. At least on my macbook.

Inside the IDE I can't press return anymore to create new line. All other keys work. It's very strange.

What keyboard do you use? (system preferences / international / input menu / name?)

Mattias

Reply by email

Dominique Louis
to Mattias Gaertner
Mattias Gaertner wrote
232 means that the character is not an F, but an unknown character. I got the same. I fixed that on sunday. At least on my macbook.

When is this likely to be commited to SVN?

What keyboard do you use? (system preferences / international / input menu / name?)

I'm using the standard MacBook Intel keyboard. Region is set to United Kingdom, Input Menu has Character Palette ticked ( it's the way it came ), British Keyboard is selected with scipt as Roman.

I hope this helps.

Reply by email

Mattias Gaertner
to Dominique Louis
Show quoted text 5 lines
Mattias Gaertner wrote: > 232 means that the character is not an F, but an unknown character. > I got the same. I fixed that on sunday. At least on my macbook. When is this likely to be commited to SVN?

Likely on last Sunday: r15936
Did you make sure, that you have no svn merge conflicts?

Show quoted text 6 lines
> What keyboard do you use? (system preferences / international / > input menu / name?) I'm using the standard MacBook Intel keyboard. Region is set to United Kingdom, Input Menu has Character Palette ticked ( it's the way it came ), British Keyboard is selected with scipt as Roman.

This works here too.

Can you try to compile the carbon interface with -dVerboseKeyboard (build clean), then compile the rest of the IDE, start IDE and press Cmd+C in IDE.

Mattias

Reply by email

Dominique Louis
to Mattias Gaertner
Mattias Gaertner wrote
This works here too.

Hi Mattias,
There is something definitately wrong because ever since your change and the need to switch to "Mac OS X " short-cut scheme, the commands do NOT work. I even did a completely clean svn update, so there can not be any conflicts at all now.

Can you try to compile the carbon interface with -dVerboseKeyboard (build clean), then compile the rest of the IDE, start IDE and press Cmd+C in IDE.

I did this and no Cmd key combinations work, neither does the Enter or Backspace key, but all other letters and numbers work fine.

Where does Lazarus store it's settings on Mac OS X. It can't be in /usr/local/share/lazarus, because I deleted everything before doing the last svn update and my IDE settings still persisted. I think that may be the only way for me to get the IDE working in it's most basic form.

Dominique.

Reply by email

Mattias Gaertner
to Dominique Louis
Show quoted text 7 lines
Mattias Gaertner wrote: > This works here too. Hi Mattias, There is something definitately wrong because ever since your change and the need to switch to "Mac OS X " short-cut scheme, the commands do NOT work.

:(
I tested various keyboard layouts and Cmd+C always worked. I will try to test on other macs.

Show quoted text 10 lines
I even did a completely clean svn update, so there can not be any conflicts at all now. > Can you try to compile the carbon interface with -dVerboseKeyboard > (build clean), then compile the rest of the IDE, start IDE and > press Cmd+C in IDE. I did this and no Cmd key combinations work, neither does the Enter or Backspace key, but all other letters and numbers work fine.

Sorry for the confusion. I meant:
Start the IDE in the terminal and see the output. Every key press should generate quite a lot when you compiled with -dVerboseKeyboard. Please try svn revision 16015.
If you don't get a lot of output, then you started an old IDE or you have not compiled the LCL clean.

Show quoted text 5 lines
Where does Lazarus store it's settings on Mac OS X. It can't be in /usr/local/share/lazarus, because I deleted everything before doing the last svn update and my IDE settings still persisted. I think that may be the only way for me to get the IDE working in it's most basic form.

~/.lazarus

The ~ stands for your home directory. /Users/username

You can load the key mapping in editor options / key mapping / choose scheme / Mac OS.

Mattias

Reply by email

Dominique Louis
to Mattias Gaertner

Hi Mattias,
No matter what I try, setting the IDE to Mac OS X does not work :(. As I mentioned, now in the IDE, regardless of which key mapping I use the Enter, BackSpace don't work at all! The IDE allows me to type other characters, but is next to useless with Enter and BackSpace. The IDE correctly show the Mac OS X keys, but keyboard short-cuts just don't work.

Lastly, and I think the worse thing of all, is that when I now build my Mac OS X Carbon application, the short-cut keys are the Lazarus Default keys, while previously before the update, they correctly compiled as Mac OS X shortcut keys. Is there something else I need to pass to the compiler so that the Mac OS X Carbon short-cut keys are used instead? Or a setting in the project file?

Thanks,

Dominique.

Mattias Gaertner wrote 45 lines
On Sun, 10 Aug 2008 11:34:48 +0100 Dominique Louis wrote: > Mattias Gaertner wrote: >> This works here too. > Hi Mattias, > There is something definitately wrong because ever since your > change and the need to switch to "Mac OS X " short-cut scheme, the > commands do NOT work. :( I tested various keyboard layouts and Cmd+C always worked. I will try to test on other macs. > I even did a completely clean svn update, so > there can not be any conflicts at all now. > > >> Can you try to compile the carbon interface with -dVerboseKeyboard >> (build clean), then compile the rest of the IDE, start IDE and >> press Cmd+C in IDE. > I did this and no Cmd key combinations work, neither does the Enter > or Backspace key, but all other letters and numbers work fine. Sorry for the confusion. I meant: Start the IDE in the terminal and see the output. Every key press should generate quite a lot when you compiled with -dVerboseKeyboard. Please try svn revision 16015. If you don't get a lot of output, then you started an old IDE or you have not compiled the LCL clean. > Where does Lazarus store it's settings on Mac OS X. It can't be in > /usr/local/share/lazarus, because I deleted everything before doing > the last svn update and my IDE settings still persisted. I think that > may be the only way for me to get the IDE working in it's most basic > form. ~/.lazarus The ~ stands for your home directory. /Users/username You can load the key mapping in editor options / key mapping / choose scheme / Mac OS.

Reply by email

Dominique Louis
to Vincent Snijders
Vincent Snijders wrote 8 lines
Dominique Louis schreef: > Hi Mattias, > No matter what I try, setting the IDE to Mac OS X does not work :(. > As I mentioned, now in the IDE, regardless of which key mapping I use > the Enter, BackSpace don't work at all! The IDE allows me to type other > characters, but is next to useless with Enter and BackSpace. Can you try the patch of http://bugs.freepascal.org/view.php?id=11974

Hi Vincent,
I tried both patch < key.patch and patch -p0 < key.patch, and in both cases I'm getting a "can't find file to patch at input line 4" error.

Am I doing something wrong?

Dominique.

Reply by email

Vincent Snijders
to Dominique Louis
Dominique Louis wrote 15 lines
Vincent Snijders wrote: > Dominique Louis schreef: >> Hi Mattias, >> No matter what I try, setting the IDE to Mac OS X does not work :(. >> As I mentioned, now in the IDE, regardless of which key mapping I use >> the Enter, BackSpace don't work at all! The IDE allows me to type other >> characters, but is next to useless with Enter and BackSpace. > Can you try the patch of http://bugs.freepascal.org/view.php?id=11974 Hi Vincent, I tried both patch < key.patch and patch -p0 < key.patch, and in both cases I'm getting a "can't find file to patch at input line 4" error. Am I doing something wrong?

This worked on my windows computer:
C:\lazarus\source\lazarus>patch -p1 -i ..\patches\key.patch patching file `lcl/interfaces/carbon/carbonprivatewindow.inc'

Vincent

Reply by email

Dominique Louis
to Vincent Snijders
Vincent Snijders wrote 19 lines
Dominique Louis schreef: > Vincent Snijders wrote: >> Dominique Louis schreef: >>> Hi Mattias, >>> No matter what I try, setting the IDE to Mac OS X does not work :(. >>> As I mentioned, now in the IDE, regardless of which key mapping I use >>> the Enter, BackSpace don't work at all! The IDE allows me to type other >>> characters, but is next to useless with Enter and BackSpace. >> Can you try the patch of http://bugs.freepascal.org/view.php?id=11974 > Hi Vincent, > I tried both patch < key.patch and patch -p0 < key.patch, and in both > cases I'm getting a "can't find file to patch at input line 4" error. > > Am I doing something wrong? > This worked on my windows computer: C:\lazarus\source\lazarus>patch -p1 -i ..\patches\key.patch patching file `lcl/interfaces/carbon/carbonprivatewindow.inc'

YES!! That patch works for me.

Thanks to the original patcher!!

Dominique.

Reply by email