all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* OS X System Key Combinations
@ 2013-05-16 18:14 tshanno
  2013-05-20 23:51 ` tshanno
  0 siblings, 1 reply; 8+ messages in thread
From: tshanno @ 2013-05-16 18:14 UTC (permalink / raw)
  To: help-gnu-emacs

Hi.

I'm using Emacs 24.3.1 under OS X.  I have a number of keyboard combinations which trigger system Services ("Send a Quick Note via the Mail.app", "Insert Date Stamp", etc…).  Unlike the Cocoa apps, when I press these key combinations in Emacs I get a "<insert key combination here> is undefined" message.  How can I get Emacs to pass these key combinations through to the operating system to trigger my scripts?

Thanks for any advice,

Tom S.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: OS X System Key Combinations
  2013-05-16 18:14 OS X System Key Combinations tshanno
@ 2013-05-20 23:51 ` tshanno
  2013-05-21  9:07   ` Peter Dyballa
  0 siblings, 1 reply; 8+ messages in thread
From: tshanno @ 2013-05-20 23:51 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

Hi,

I was a little surprised that this didn't get a response.  I can't believe that its the only time its come up.  Is this an FAQ of some type?

Thanks for any help.

Tom S.

On May 17, 2013, at 4:14 AM, tshanno@bearingthenews.com wrote:

> Hi.
> 
> I'm using Emacs 24.3.1 under OS X.  I have a number of keyboard combinations which trigger system Services ("Send a Quick Note via the Mail.app", "Insert Date Stamp", etc…).  Unlike the Cocoa apps, when I press these key combinations in Emacs I get a "<insert key combination here> is undefined" message.  How can I get Emacs to pass these key combinations through to the operating system to trigger my scripts?
> 
> Thanks for any advice,
> 
> Tom S.
> 
> 
> 




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: OS X System Key Combinations
  2013-05-20 23:51 ` tshanno
@ 2013-05-21  9:07   ` Peter Dyballa
  2013-05-21 21:18     ` tshanno
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Dyballa @ 2013-05-21  9:07 UTC (permalink / raw)
  To: tshanno; +Cc: help-gnu-emacs@gnu.org


Am 21.05.2013 um 01:51 schrieb tshanno@bearingthenews.com:

> I was a little surprised that this didn't get a response.  I can't believe that its the only time its come up.  Is this an FAQ of some type?

No, it's just an understanding type. Without using some Mac OS X libraries or Frameworks you do not have access to the Mac OS X services. You might try to write Elisp functions that use osascript to access the Mac OS X services… Why isn't your X server or your terminal emulator, in which GNU Emacs runs, providing the access you want?

What is so bad of using the NS variant of GNU Emacs or the AppKit Emacs?

--
Mit friedvollen Grüßen

  Pete

Got Mole problems?
Call Avogadro 6.02 x 10^23




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: OS X System Key Combinations
  2013-05-21  9:07   ` Peter Dyballa
@ 2013-05-21 21:18     ` tshanno
  2013-05-21 21:41       ` Peter Dyballa
  0 siblings, 1 reply; 8+ messages in thread
From: tshanno @ 2013-05-21 21:18 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

Hi Peter.

Well, I would agree that its an understanding type.  Most questions usually are.  :)

I'm using GNU Emacs version 24.3  It was obtained here:

http://emacsformacosx.com

As far as I know the X server on my system is not running.  At least not of the type I've used for almost 20 years under Linux.  It doesn't say it explicitly on the website but it certainly looks like it is, indeed, the "AppKit Emacs".

I take it from your response that this should, indeed, be passing the key combinations through to the system using this version of Emacs and that there is something wrong with my installation.  Is that correct?

Thanks for the response and for any further help.

Tom S.

On May 21, 2013, at 7:07 PM, Peter Dyballa <Peter_Dyballa@Web.DE> wrote:

> 
> Am 21.05.2013 um 01:51 schrieb tshanno@bearingthenews.com:
> 
>> I was a little surprised that this didn't get a response.  I can't believe that its the only time its come up.  Is this an FAQ of some type?
> 
> No, it's just an understanding type. Without using some Mac OS X libraries or Frameworks you do not have access to the Mac OS X services. You might try to write Elisp functions that use osascript to access the Mac OS X services… Why isn't your X server or your terminal emulator, in which GNU Emacs runs, providing the access you want?
> 
> What is so bad of using the NS variant of GNU Emacs or the AppKit Emacs?
> 
> --
> Mit friedvollen Grüßen
> 
>  Pete
> 
> Got Mole problems?
> Call Avogadro 6.02 x 10^23
> 
> 




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: OS X System Key Combinations
  2013-05-21 21:18     ` tshanno
@ 2013-05-21 21:41       ` Peter Dyballa
  2013-05-21 21:59         ` tshanno
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Dyballa @ 2013-05-21 21:41 UTC (permalink / raw)
  To: tshanno; +Cc: help-gnu-emacs@gnu.org


Am 21.05.2013 um 23:18 schrieb tshanno@bearingthenews.com:

> http://emacsformacosx.com
> 
> As far as I know the X server on my system is not running.  At least not of the type I've used for almost 20 years under Linux.  It doesn't say it explicitly on the website but it certainly looks like it is, indeed, the "AppKit Emacs".

No, it looks like the NS variant from the unpatched GNU Emacs 24.3.50 sources. It will report on M-x emacs-version RET something like:

	GNU Emacs 24.3.50 (i386-apple-darwin10.8.0, NS apple-appkit-1038.36) of 2013-05-20 on …
                                                    **

The "AppKit Emacs", with a history as Carbon Emacs, will report something like this:

	GNU Emacs 23.4.1 (x86_64-apple-darwin10.8.0, Carbon Version 1.6.0 AppKit 1038.36) of 2012-09-11 on …
                                                     ******

> 
> I take it from your response that this should, indeed, be passing the key combinations through to the system using this version of Emacs and that there is something wrong with my installation.  Is that correct?

It should. But both Emacsen change the meaning of the alt, cmd, and maybe more keys by default. With C-h k you can find out what alt-a and cmd-a are and you can also look via Emacs -> Services from the  menu bar at the services your Emacs sees. The modifier keys I mentioned have, presumingly, names like

	ns-alternate-modifier
	   This variable describes the behavior of the alternate or option
	   key.
	ns-command-modifier
	   This variable describes the behavior of the command key.
	ns-control-modifier
	   This variable describes the behavior of the control key.
	ns-function-modifier
	   This variable describes the behavior of the function key (on
	   laptops).
	ns-option-modifier
	ns-right-alternate-modifier
	   This variable describes the behavior of the right alternate or
	   option key.
	ns-right-command-modifier
	   This variable describes the behavior of the right command key.
	ns-right-control-modifier
	   This variable describes the behavior of the right control key.
	ns-right-option-modifier

Have you recorded your key combinations in System Preferences in a way that the Emacs applications do have knowledge of them?

--
Mit friedvollen Grüßen

  Pete

The world would be a better place if Larry Wall had been born in Iceland, or any other country where the native language actually has syntax.
				– Peter da Silva




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: OS X System Key Combinations
  2013-05-21 21:41       ` Peter Dyballa
@ 2013-05-21 21:59         ` tshanno
  2013-05-21 22:30           ` Peter Dyballa
  0 siblings, 1 reply; 8+ messages in thread
From: tshanno @ 2013-05-21 21:59 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

Hi, Pete.

The command key is the Emacs super key here.  The option key is the Emacs meta key.  The control key is, of course, Emacs control.

In the Emacs system preferences, for instance, I have a service which inserts a date stamp.  This service is bound to command-option-control-d.  The service is defined and available for all applications (not just Emacs).  It, along with all of the other combinations defined there, works fine with my other applications.   But Emacs reports:

<C-M-s-268632068> is undefined

Which, of course, it is in Emacs.

Thanks again for the response.

Tom

On May 22, 2013, at 7:41 AM, Peter Dyballa <Peter_Dyballa@Web.DE> wrote:

> 
> Am 21.05.2013 um 23:18 schrieb tshanno@bearingthenews.com:
> 
>> http://emacsformacosx.com
>> 
>> As far as I know the X server on my system is not running.  At least not of the type I've used for almost 20 years under Linux.  It doesn't say it explicitly on the website but it certainly looks like it is, indeed, the "AppKit Emacs".
> 
> No, it looks like the NS variant from the unpatched GNU Emacs 24.3.50 sources. It will report on M-x emacs-version RET something like:
> 
> 	GNU Emacs 24.3.50 (i386-apple-darwin10.8.0, NS apple-appkit-1038.36) of 2013-05-20 on …
>                                                    **
> 
> The "AppKit Emacs", with a history as Carbon Emacs, will report something like this:
> 
> 	GNU Emacs 23.4.1 (x86_64-apple-darwin10.8.0, Carbon Version 1.6.0 AppKit 1038.36) of 2012-09-11 on …
>                                                     ******
> 
>> 
>> I take it from your response that this should, indeed, be passing the key combinations through to the system using this version of Emacs and that there is something wrong with my installation.  Is that correct?
> 
> It should. But both Emacsen change the meaning of the alt, cmd, and maybe more keys by default. With C-h k you can find out what alt-a and cmd-a are and you can also look via Emacs -> Services from the  menu bar at the services your Emacs sees. The modifier keys I mentioned have, presumingly, names like
> 
> 	ns-alternate-modifier
> 	   This variable describes the behavior of the alternate or option
> 	   key.
> 	ns-command-modifier
> 	   This variable describes the behavior of the command key.
> 	ns-control-modifier
> 	   This variable describes the behavior of the control key.
> 	ns-function-modifier
> 	   This variable describes the behavior of the function key (on
> 	   laptops).
> 	ns-option-modifier
> 	ns-right-alternate-modifier
> 	   This variable describes the behavior of the right alternate or
> 	   option key.
> 	ns-right-command-modifier
> 	   This variable describes the behavior of the right command key.
> 	ns-right-control-modifier
> 	   This variable describes the behavior of the right control key.
> 	ns-right-option-modifier
> 
> Have you recorded your key combinations in System Preferences in a way that the Emacs applications do have knowledge of them?
> 
> --
> Mit friedvollen Grüßen
> 
>  Pete
> 
> The world would be a better place if Larry Wall had been born in Iceland, or any other country where the native language actually has syntax.
> 				– Peter da Silva
> 




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: OS X System Key Combinations
  2013-05-21 21:59         ` tshanno
@ 2013-05-21 22:30           ` Peter Dyballa
  2013-05-21 23:36             ` tshanno
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Dyballa @ 2013-05-21 22:30 UTC (permalink / raw)
  To: tshanno@bearingthenews.com; +Cc: help-gnu-emacs@gnu.org


Am 21.05.2013 um 23:59 schrieb tshanno@bearingthenews.com:

> But Emacs reports:
> 
> <C-M-s-268632068> is undefined

And this means: GNU Emacs is swallowing the key combination, it does not reach the operating system. You can either try to find a key combination that bypasses GNU Emacs or create functions that perform the service calls and bind them to the key combinations.

The NS variant performs the latter. Check out what M-m or M-h do!

The "Carbon AppKit" Emacs does not see M-h. C-h k M-h hides it at once and when you open it, you see the prompt in mini-buffer.

--
Greetings

  Pete

Experience is what you get when you don't get what you want.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: OS X System Key Combinations
  2013-05-21 22:30           ` Peter Dyballa
@ 2013-05-21 23:36             ` tshanno
  0 siblings, 0 replies; 8+ messages in thread
From: tshanno @ 2013-05-21 23:36 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

Thanks, Pete.  I'll try to create the functions.

Cheers,
Tom S.

On May 22, 2013, at 8:30 AM, Peter Dyballa <Peter_Dyballa@Web.DE> wrote:

> 
> Am 21.05.2013 um 23:59 schrieb tshanno@bearingthenews.com:
> 
>> But Emacs reports:
>> 
>> <C-M-s-268632068> is undefined
> 
> And this means: GNU Emacs is swallowing the key combination, it does not reach the operating system. You can either try to find a key combination that bypasses GNU Emacs or create functions that perform the service calls and bind them to the key combinations.
> 
> The NS variant performs the latter. Check out what M-m or M-h do!
> 
> The "Carbon AppKit" Emacs does not see M-h. C-h k M-h hides it at once and when you open it, you see the prompt in mini-buffer.
> 
> --
> Greetings
> 
>  Pete
> 
> Experience is what you get when you don't get what you want.
> 
> 




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-05-21 23:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-16 18:14 OS X System Key Combinations tshanno
2013-05-20 23:51 ` tshanno
2013-05-21  9:07   ` Peter Dyballa
2013-05-21 21:18     ` tshanno
2013-05-21 21:41       ` Peter Dyballa
2013-05-21 21:59         ` tshanno
2013-05-21 22:30           ` Peter Dyballa
2013-05-21 23:36             ` tshanno

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.