all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* MacOSx (10.15) and remap caps lock to hyper
@ 2021-03-21  7:11 Uwe Brauer
  2021-03-21  7:18 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-03-21 11:18 ` Gregory Heytings
  0 siblings, 2 replies; 13+ messages in thread
From: Uwe Brauer @ 2021-03-21  7:11 UTC (permalink / raw)
  To: help-gnu-emacs


Hi

I either successfully compiled GNU emacs master or installed 
emacsformacosx.

In emacsformacosx I can map 
command to meta, 
option to super

but I would like to swap 
control with capslock 

And then map 
capslock to hyper.

I also tried the karabiner app, but there seems no way to map capslock
into hyper.

Anybody has an idea?

Thanks

Uwe Brauer 




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

* Re: MacOSx (10.15) and remap caps lock to hyper
  2021-03-21  7:11 MacOSx (10.15) and remap caps lock to hyper Uwe Brauer
@ 2021-03-21  7:18 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-03-21  8:14   ` Uwe Brauer
  2021-03-21 11:18 ` Gregory Heytings
  1 sibling, 1 reply; 13+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-03-21  7:18 UTC (permalink / raw)
  To: help-gnu-emacs

Uwe Brauer wrote:

> In emacsformacosx I can map command to meta, option to super

command, option and super are Apple keys?

> capslock to hyper

and hyper as well?

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




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

* Re: MacOSx (10.15) and remap caps lock to hyper
  2021-03-21  7:18 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-03-21  8:14   ` Uwe Brauer
  2021-03-21  8:25     ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 13+ messages in thread
From: Uwe Brauer @ 2021-03-21  8:14 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 359 bytes --]

>>> "EBvUlftGEte" == Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> writes:

   > Uwe Brauer wrote:
   >> In emacsformacosx I can map command to meta, option to super

   > command, option and super are Apple keys?
Command, option, capslock and control are app keys

Meta, super, hyper, control 

Is what I want

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

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

* Re: MacOSx (10.15) and remap caps lock to hyper
  2021-03-21  8:14   ` Uwe Brauer
@ 2021-03-21  8:25     ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-03-21  8:31       ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 13+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-03-21  8:25 UTC (permalink / raw)
  To: help-gnu-emacs

Uwe Brauer wrote:

> Meta, super, hyper, control 
>
> Is what I want

What is super and hyper?

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




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

* Re: MacOSx (10.15) and remap caps lock to hyper
  2021-03-21  8:25     ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-03-21  8:31       ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-03-21  8:59         ` Uwe Brauer
  0 siblings, 1 reply; 13+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-03-21  8:31 UTC (permalink / raw)
  To: help-gnu-emacs

>> Meta, super, hyper, control 
>>
>> Is what I want
>
> What is super

Ah, that's 125 in /dev/console - the one I use as a compose
key.

But even if you want to use it for Emacs shortcuts, what's the
notation to describe the sequence?

I'm only aware of the C (control) and M (meta) notation - what
more is it?

  (global-unset-key "\C-h\C-a") ; `about-emacs'

  (global-set-key "\M-9" #'eval-last-sexp)

Well, sure, this notation (but same)

  (global-set-key  [C-m] #'eval-defun)

and `kbd' (same!)

> and hyper?

Don't know :)

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




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

* Re: MacOSx (10.15) and remap caps lock to hyper
  2021-03-21  8:31       ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-03-21  8:59         ` Uwe Brauer
  2021-03-21  9:26           ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 13+ messages in thread
From: Uwe Brauer @ 2021-03-21  8:59 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1105 bytes --]

>>> "EBvUlftGEte" == Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> writes:

   >>> Meta, super, hyper, control 
   >>> 
   >>> Is what I want
   >> 
   >> What is super

   > Ah, that's 125 in /dev/console - the one I use as a compose
   > key.

Well 

I am on Ubuntu 16.04, using a thinkpad X1.


Here is a part of my Xmodmap

keycode 37 = Hyper_L NoSymbol Hyper_L
keycode  64 = Alt_L Meta_L Alt_L Meta_L
keycode  66 = Control_L NoSymbol Control_L
keycode 133 = Super_L NoSymbol Super_L
keycode 134 = Super_R NoSymbol Super_R


clear Lock
clear Control
clear Mod1
clear Mod2
clear Mod3
clear Mod4
clear Mod5


add    Control = Control_L
add    Mod1    = Meta_L
add    Mod3    = Super_L
add    Mod4    = Hyper_L
add    Mod5    = Num_Lock


And then I can enjoy stuff like

(global-set-key [(super f3)]   'delete-frame)
(global-set-key [(hyper f3)] 'ediff-copy-to-register-B)


Etc

This is what I want for my mac, since the mac has, incomprehensibly,
less keys than the Thinkpad.

Did I now explain myself?

Uwe 

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

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

* Re: MacOSx (10.15) and remap caps lock to hyper
  2021-03-21  8:59         ` Uwe Brauer
@ 2021-03-21  9:26           ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-03-21  9:30             ` Uwe Brauer
  0 siblings, 1 reply; 13+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-03-21  9:26 UTC (permalink / raw)
  To: help-gnu-emacs

Uwe Brauer wrote:

> And then I can enjoy stuff like
>
> (global-set-key [(super f3)]   'delete-frame)
> (global-set-key [(hyper f3)] 'ediff-copy-to-register-B)

OK, interesting!

> This is what I want for my mac, since the mac has,
> incomprehensibly, less keys than the Thinkpad.

Apple is like that. Remove everything because it is too
difficult to handle for the poor consumer. Then charge twice
as much as comparable machines. This makes the consumer the
chic elite.

???

But - don't hate the player, hate the game :)

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




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

* Re: MacOSx (10.15) and remap caps lock to hyper
  2021-03-21  9:26           ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-03-21  9:30             ` Uwe Brauer
  2021-03-21  9:39               ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 13+ messages in thread
From: Uwe Brauer @ 2021-03-21  9:30 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 804 bytes --]

>>> "EBvUlftGEte" == Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> writes:

> Uwe Brauer wrote:
>> And then I can enjoy stuff like
>> 
>> (global-set-key [(super f3)]   'delete-frame)
>> (global-set-key [(hyper f3)] 'ediff-copy-to-register-B)

> OK, interesting!

>> This is what I want for my mac, since the mac has,
>> incomprehensibly, less keys than the Thinkpad.

> Apple is like that. Remove everything because it is too
> difficult to handle for the poor consumer. Then charge twice
> as much as comparable machines. This makes the consumer the
> chic elite.

Right but it works nicely with my iPad for teaching, but I don't think
it can replace my Thinkpad for work.

Back to my question, any idea how to achieve the hyper key on a Mac?

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

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

* Re: MacOSx (10.15) and remap caps lock to hyper
  2021-03-21  9:30             ` Uwe Brauer
@ 2021-03-21  9:39               ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-03-21 19:55                 ` Uwe Brauer
  0 siblings, 1 reply; 13+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-03-21  9:39 UTC (permalink / raw)
  To: help-gnu-emacs

Uwe Brauer wrote:

> Back to my question, any idea how to achieve the hyper key
> on a Mac?

If there is a physical key on the keyboard and Emacs notation
covers it as well as the intended use it should be the same
procedure as for any other key that live up to these
criteria...

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




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

* Re: MacOSx (10.15) and remap caps lock to hyper
  2021-03-21  7:11 MacOSx (10.15) and remap caps lock to hyper Uwe Brauer
  2021-03-21  7:18 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-03-21 11:18 ` Gregory Heytings
  2021-03-21 13:52   ` Gregory Heytings
  1 sibling, 1 reply; 13+ messages in thread
From: Gregory Heytings @ 2021-03-21 11:18 UTC (permalink / raw)
  To: Uwe Brauer; +Cc: help-gnu-emacs


>
> but I would like to swap control with capslock
>

You can do this in macOS preferences, in the keyboard item.

>
> And then map capslock to hyper.
>

You mean, map the resulting caps lock, that is, the key labeled "Ctrl", to 
"hyper"?  It seems that, if you map both the caps lock and the control 
keys to "control" in the macOS preferences, and if you add

(setq mac-right-control-modifier 'control)
(setq mac-command-modifier 'meta)
(setq mac-option-modifier 'super)
(setq mac-control-modifier 'hyper)

to your init file, you'll have what you want.



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

* Re: MacOSx (10.15) and remap caps lock to hyper
  2021-03-21 11:18 ` Gregory Heytings
@ 2021-03-21 13:52   ` Gregory Heytings
  2021-03-21 15:21     ` Uwe Brauer
  0 siblings, 1 reply; 13+ messages in thread
From: Gregory Heytings @ 2021-03-21 13:52 UTC (permalink / raw)
  To: Uwe Brauer; +Cc: help-gnu-emacs


>
> It seems that, if you map both the caps lock and the control keys to 
> "control" in the macOS preferences, and if you add
>
> (setq mac-right-control-modifier 'control)
> (setq mac-command-modifier 'meta)
> (setq mac-option-modifier 'super)
> (setq mac-control-modifier 'hyper)
>
> to your init file, you'll have what you want.
>

You also have to add:

(setq mac-right-option-modifier nil)

otherwise you won't be able to type characters that are not visible on the 
keyboard anymore.



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

* Re: MacOSx (10.15) and remap caps lock to hyper
  2021-03-21 13:52   ` Gregory Heytings
@ 2021-03-21 15:21     ` Uwe Brauer
  0 siblings, 0 replies; 13+ messages in thread
From: Uwe Brauer @ 2021-03-21 15:21 UTC (permalink / raw)
  To: Gregory Heytings; +Cc: Uwe Brauer, help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 938 bytes --]

>>> "GH" == Gregory Heytings <gregory@heytings.org> writes:

>> 
>> It seems that, if you map both the caps lock and the control keys to
>> "control" in the macOS preferences, and if you add
>> 
>> (setq mac-right-control-modifier 'control)
>> (setq mac-command-modifier 'meta)
>> (setq mac-option-modifier 'super)
>> (setq mac-control-modifier 'hyper)
>> 
>> to your init file, you'll have what you want.
>> 

> You also have to add:

> (setq mac-right-option-modifier nil)


Thanks your solution works nicely!!

I found another one, which involves the ns lisp package and the
karabiner app.

So first I map with karabiner
caps lock to control 
and left control to fn

(Most likely I could do this without karabiner)

And then I set 


(when (eq system-type 'darwin)
  (setq  ns-alternate-modifier 'super)
  (setq  ns-command-modifier 'meta)
  (setq  ns-function-modifier 'hyper))

Works also!



[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

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

* Re: MacOSx (10.15) and remap caps lock to hyper
  2021-03-21  9:39               ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-03-21 19:55                 ` Uwe Brauer
  0 siblings, 0 replies; 13+ messages in thread
From: Uwe Brauer @ 2021-03-21 19:55 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 517 bytes --]

>>> "EBvUlftGEte" == Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> writes:

> Uwe Brauer wrote:
>> Back to my question, any idea how to achieve the hyper key
>> on a Mac?

> If there is a physical key on the keyboard and Emacs notation
> covers it as well as the intended use it should be the same
> procedure as for any other key that live up to these
> criteria...

The issue was solved, please look at the correspondence between Gregory
and myself, in case you are interested.

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

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

end of thread, other threads:[~2021-03-21 19:55 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-21  7:11 MacOSx (10.15) and remap caps lock to hyper Uwe Brauer
2021-03-21  7:18 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-03-21  8:14   ` Uwe Brauer
2021-03-21  8:25     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-03-21  8:31       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-03-21  8:59         ` Uwe Brauer
2021-03-21  9:26           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-03-21  9:30             ` Uwe Brauer
2021-03-21  9:39               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-03-21 19:55                 ` Uwe Brauer
2021-03-21 11:18 ` Gregory Heytings
2021-03-21 13:52   ` Gregory Heytings
2021-03-21 15:21     ` Uwe Brauer

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.