all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#34984: ns-right-command-modifier has influence to left
@ 2019-03-25  0:57 Tak Kunihiro
  2019-03-25 21:41 ` Alan Third
  0 siblings, 1 reply; 6+ messages in thread
From: Tak Kunihiro @ 2019-03-25  0:57 UTC (permalink / raw)
  To: 34984; +Cc: tkk

On macOS, assignment for left-command key is controlled
by that for right-command key.

  GNU Emacs 26.1 (build 1, x86_64-apple-darwin14.5.0, NS appkit-1348.17 Version 10.10.5 (Build 14F2511)) of 2018-05-31
  macOS Mojave 10.14.3
  Mac mini (2018)
  
  /Applications/Emacs.app/Contents/MacOS/Emacs -Q
  C-h k leftcommand-x
  s-x runs the command kill-region (found in global-map),...
  M-: (setq ns-right-command-modifier 'meta)
  C-h k leftcommand-x
  M-x runs the command execute-extended-command (found in global-map),...

This does not happen with Mac mini (2012) with other parameters and
the same keyboard.





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

* bug#34984: ns-right-command-modifier has influence to left
  2019-03-25  0:57 bug#34984: ns-right-command-modifier has influence to left Tak Kunihiro
@ 2019-03-25 21:41 ` Alan Third
  2019-03-26  3:46   ` Tak Kunihiro
  0 siblings, 1 reply; 6+ messages in thread
From: Alan Third @ 2019-03-25 21:41 UTC (permalink / raw)
  To: Tak Kunihiro; +Cc: 34984

On Mon, Mar 25, 2019 at 09:57:37AM +0900, Tak Kunihiro wrote:
> On macOS, assignment for left-command key is controlled
> by that for right-command key.
> 
>   GNU Emacs 26.1 (build 1, x86_64-apple-darwin14.5.0, NS appkit-1348.17 Version 10.10.5 (Build 14F2511)) of 2018-05-31
>   macOS Mojave 10.14.3
>   Mac mini (2018)
>   
>   /Applications/Emacs.app/Contents/MacOS/Emacs -Q
>   C-h k leftcommand-x
>   s-x runs the command kill-region (found in global-map),...
>   M-: (setq ns-right-command-modifier 'meta)
>   C-h k leftcommand-x
>   M-x runs the command execute-extended-command (found in global-map),...
> 
> This does not happen with Mac mini (2012) with other parameters and
> the same keyboard.

Hi Tak, some questions:

Can you replicate the issue with the master branch? The modifier
handling has been almost completely rewritten in it.

Does the right command key work correctly?

Do you use any third‐party key remapping software?
-- 
Alan Third





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

* bug#34984: ns-right-command-modifier has influence to left
  2019-03-25 21:41 ` Alan Third
@ 2019-03-26  3:46   ` Tak Kunihiro
  2019-03-28 21:52     ` Alan Third
  0 siblings, 1 reply; 6+ messages in thread
From: Tak Kunihiro @ 2019-03-26  3:46 UTC (permalink / raw)
  To: Alan Third; +Cc: 国広卓也, 34984

Dear Alan,

> Can you replicate the issue with the master branch?
> The modifier handling has been almost completely rewritten in it.

I tested on 27.0.50.  The results are the same.


> Does the right command key work correctly?

It does not work correctly.  Even after (setq ns-right-command-modifier ‘meta),
`rightcommand-x’ gives `s-x’.


> Do you use any third‐party key remapping software?


I connected USB keyboard not specifically designed for macOS.
I swap `Option Key' and `Command Key’ using on Keyboard panel 
in System Preferences.  I do not use third-party key remapping
software.


Tak


GNU Emacs 27.0.50 (build 1, x86_64-apple-darwin18.5.0, NS appkit-1671.40 Version 10.14.4 (Build 18E226))
 of 2019-03-26
macOS Mojave 10.14.4
Mac mini (2018)


 ~/Downloads/emacs/nextstep/Emacs.app/Contents/MacOS/Emacs -Q
 C-h k leftcommand-x
 s-x runs the command kill-region (found in global-map),...
 c-h k rightcommand-x
 s-x runs the command kill-region (found in global-map),...

 M-: (setq ns-right-command-modifier 'meta)
 C-h k leftcommand-x
 M-x runs the command execute-extended-command (found in global-map),...
 c-h k rightcommand-x
 s-x runs the command kill-region (found in global-map), ...


> On Mar 26, 2019, at 06:41, Alan Third <alan@idiocy.org> wrote:
> 
> On Mon, Mar 25, 2019 at 09:57:37AM +0900, Tak Kunihiro wrote:
>> On macOS, assignment for left-command key is controlled
>> by that for right-command key.
>> 
>>  GNU Emacs 26.1 (build 1, x86_64-apple-darwin14.5.0, NS appkit-1348.17 Version 10.10.5 (Build 14F2511)) of 2018-05-31
>>  macOS Mojave 10.14.3
>>  Mac mini (2018)
>> 
>>  /Applications/Emacs.app/Contents/MacOS/Emacs -Q
>>  C-h k leftcommand-x
>>  s-x runs the command kill-region (found in global-map),...
>>  M-: (setq ns-right-command-modifier 'meta)
>>  C-h k leftcommand-x
>>  M-x runs the command execute-extended-command (found in global-map),...
>> 
>> This does not happen with Mac mini (2012) with other parameters and
>> the same keyboard.
> 
> Hi Tak, some questions:
> 
> Can you replicate the issue with the master branch? The modifier
> handling has been almost completely rewritten in it.
> 
> Does the right command key work correctly?
> 
> Do you use any third‐party key remapping software?






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

* bug#34984: ns-right-command-modifier has influence to left
  2019-03-26  3:46   ` Tak Kunihiro
@ 2019-03-28 21:52     ` Alan Third
  2019-03-29  8:35       ` Nick Helm
  2019-03-29  8:42       ` Tak Kunihiro
  0 siblings, 2 replies; 6+ messages in thread
From: Alan Third @ 2019-03-28 21:52 UTC (permalink / raw)
  To: Tak Kunihiro; +Cc: 34984

On Tue, Mar 26, 2019 at 12:46:18PM +0900, Tak Kunihiro wrote:
> Dear Alan,
> 
> > Can you replicate the issue with the master branch?
> > The modifier handling has been almost completely rewritten in it.
> 
> I tested on 27.0.50.  The results are the same.

Thanks.

> I connected USB keyboard not specifically designed for macOS.
> I swap `Option Key' and `Command Key’ using on Keyboard panel 
> in System Preferences.  I do not use third-party key remapping
> software.

I can replicate this. The key is to swap command and option. I also
see it using my swapped caps lock ‐> ctrl. It shows up as right
control when I would expect it to be left.

Unfortunately I’m not sure what we can do about it. I don’t think we
have any way of determining whether the keys have been swapped. And
even if we did, whether the keyboard is a USB one.

Someone with an Apple developer account could raise it on radar, but
as the keycodes we’re using to determine left vs right are unofficial
I don’t know if Apple would do anything.

For the record the Mac port has the same issue.

Sorry, I can’t think of any way round it.
-- 
Alan Third





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

* bug#34984: ns-right-command-modifier has influence to left
  2019-03-28 21:52     ` Alan Third
@ 2019-03-29  8:35       ` Nick Helm
  2019-03-29  8:42       ` Tak Kunihiro
  1 sibling, 0 replies; 6+ messages in thread
From: Nick Helm @ 2019-03-29  8:35 UTC (permalink / raw)
  To: Alan Third; +Cc: Tak Kunihiro, 34984@debbugs.gnu.org

Alan Third <alan@idiocy.org> writes:

> I can replicate this. The key is to swap command and option. I also
> see it using my swapped caps lock ‐> ctrl. It shows up as right
> control when I would expect it to be left.
>
> Unfortunately I’m not sure what we can do about it. 

This only seems to happen when the modifiers are swapped using System
Preferences. On my machine the problem goes away if I remap using
another method. 

Try putting the modifiers back to their defaults in System Preferemces
then running the following command (this swaps events left_alt and
left_gui, and right_alt and right_gui). Note that this won't survive
reboot.

$ hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x7000000E2,"HIDKeyboardModifierMappingDst":0x7000000E3},{"HIDKeyboardModifierMappingSrc":0x7000000E3,"HIDKeyboardModifierMappingDst":0x7000000E2},{"HIDKeyboardModifierMappingSrc":0x7000000E6,"HIDKeyboardModifierMappingDst":0x7000000E7},{"HIDKeyboardModifierMappingSrc":0x7000000E7,"HIDKeyboardModifierMappingDst":0x7000000E6}]}'

You can probably do similar tricks with karabiner and other key
remappers. 

Nick

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

* bug#34984: ns-right-command-modifier has influence to left
  2019-03-28 21:52     ` Alan Third
  2019-03-29  8:35       ` Nick Helm
@ 2019-03-29  8:42       ` Tak Kunihiro
  1 sibling, 0 replies; 6+ messages in thread
From: Tak Kunihiro @ 2019-03-29  8:42 UTC (permalink / raw)
  To: alan; +Cc: tkk, 34984

>> > Can you replicate the issue with the master branch?
>> > The modifier handling has been almost completely rewritten in it.
>> 
>> I tested on 27.0.50.  The results are the same.
> 
> Thanks.
> 
>> I connected USB keyboard not specifically designed for macOS.
>> I swap `Option Key' and `Command Key’ using on Keyboard panel 
>> in System Preferences.  I do not use third-party key remapping
>> software.
> 
> I can replicate this. The key is to swap command and option. I also
> see it using my swapped caps lock ‐> ctrl. It shows up as right
> control when I would expect it to be left.
> 
> For the record the Mac port has the same issue.
> 
> Sorry, I can’t think of any way round it.

I'm okay.  I wanted the right-command key acts as Apple key when I
have to switch between Excel and Emacs 100 times but such opportunity
is very rare.

Thank you to take a look of the problem.  I will keep trying to
report problems of Emacs on macOS.





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

end of thread, other threads:[~2019-03-29  8:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-25  0:57 bug#34984: ns-right-command-modifier has influence to left Tak Kunihiro
2019-03-25 21:41 ` Alan Third
2019-03-26  3:46   ` Tak Kunihiro
2019-03-28 21:52     ` Alan Third
2019-03-29  8:35       ` Nick Helm
2019-03-29  8:42       ` Tak Kunihiro

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.