unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19931: 24.4; Support for OS X press and hold
@ 2015-02-23 21:05 Philipp Stephani
  2020-11-23 14:04 ` Stefan Kangas
  0 siblings, 1 reply; 10+ messages in thread
From: Philipp Stephani @ 2015-02-23 21:05 UTC (permalink / raw)
  To: 19931

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

Message-ID: <m28ufo737a.fsf@p.i-did-not-set--mail-host-address--so-tickle-me
>
--text follows this line--

"Press and hold" is an OS X input method used for entering accented
characters if a key is held down (instead of repeating the key).  It's
not supported in Emacs.
http://lists.gnu.org/archive/html/emacs-devel/2011-06/msg00784.html
states: "Let's look into making it work properly once people decide to
install Lion."
That was more than three years ago, and since then two major OS X
versions have been released, but unfortunately press and hold is still
not supported.  It would be great to support this feature to make Emacs
more consistent with other apps on OS X.


In GNU Emacs 24.4.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21)
 of 2014-10-22 on p
Windowing system distributor `Apple', version 10.3.1344
Configured using:
 `configure --prefix=/usr/local/Cellar/emacs/24.4
 --enable-locallisppath=/usr/local/share/emacs/site-lisp
 --infodir=/usr/local/Cellar/emacs/24.4/share/info/emacs --without-dbus
 --without-gnutls --with-ns --disable-ns-self-contained'

Important settings:
  value of $LANG: de_DE.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<menu-bar> <help-menu> <send-emacs-bug-report>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util help-fns mail-prsvr mail-utils time-date tooltip electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd
fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
cocoa ns multi-tty emacs)

Memory information:
((conses 16 71987 6607)
 (symbols 48 17377 0)
 (miscs 40 36 154)
 (strings 32 9965 4605)
 (string-bytes 1 263174)
 (vectors 16 9021)
 (vector-slots 8 384474 14793)
 (floats 8 53 103)
 (intervals 56 179 0)
 (buffers 960 11))

[-- Attachment #2: Type: text/html, Size: 3411 bytes --]

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

* bug#19931: 24.4; Support for OS X press and hold
  2015-02-23 21:05 bug#19931: 24.4; Support for OS X press and hold Philipp Stephani
@ 2020-11-23 14:04 ` Stefan Kangas
  2020-12-12 16:52   ` Philipp Stephani
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Kangas @ 2020-11-23 14:04 UTC (permalink / raw)
  To: Philipp Stephani; +Cc: 19931

Philipp Stephani <p.stephani2@gmail.com> writes:

> "Press and hold" is an OS X input method used for entering accented
> characters if a key is held down (instead of repeating the key).  It's
> not supported in Emacs.
> http://lists.gnu.org/archive/html/emacs-devel/2011-06/msg00784.html
> states: "Let's look into making it work properly once people decide to
> install Lion."
> That was more than three years ago, and since then two major OS X
> versions have been released, but unfortunately press and hold is still
> not supported.  It would be great to support this feature to make Emacs
> more consistent with other apps on OS X.

Do we have support for this on free operating systems?  Otherwise, I
think the policy is that we can't add it to Emacs.





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

* bug#19931: 24.4; Support for OS X press and hold
  2020-11-23 14:04 ` Stefan Kangas
@ 2020-12-12 16:52   ` Philipp Stephani
  2020-12-13  4:11     ` Pankaj Jangid
  0 siblings, 1 reply; 10+ messages in thread
From: Philipp Stephani @ 2020-12-12 16:52 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 19931

Am Mo., 23. Nov. 2020 um 15:04 Uhr schrieb Stefan Kangas <stefan@marxist.se>:
>
> Philipp Stephani <p.stephani2@gmail.com> writes:
>
> > "Press and hold" is an OS X input method used for entering accented
> > characters if a key is held down (instead of repeating the key).  It's
> > not supported in Emacs.
> > http://lists.gnu.org/archive/html/emacs-devel/2011-06/msg00784.html
> > states: "Let's look into making it work properly once people decide to
> > install Lion."
> > That was more than three years ago, and since then two major OS X
> > versions have been released, but unfortunately press and hold is still
> > not supported.  It would be great to support this feature to make Emacs
> > more consistent with other apps on OS X.
>
> Do we have support for this on free operating systems?  Otherwise, I
> think the policy is that we can't add it to Emacs.

Probably yes, at least I haven't found similar functionality on free
windowing systems.





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

* bug#19931: 24.4; Support for OS X press and hold
  2020-12-12 16:52   ` Philipp Stephani
@ 2020-12-13  4:11     ` Pankaj Jangid
  2020-12-13  8:38       ` Juri Linkov
  0 siblings, 1 reply; 10+ messages in thread
From: Pankaj Jangid @ 2020-12-13  4:11 UTC (permalink / raw)
  To: Philipp Stephani; +Cc: Stefan Kangas, 19931

Philipp Stephani <p.stephani2@gmail.com> writes:

>> > "Press and hold" is an OS X input method used for entering accented
>> > characters if a key is held down (instead of repeating the key).  It's
>> > not supported in Emacs.
>> > http://lists.gnu.org/archive/html/emacs-devel/2011-06/msg00784.html
>> > states: "Let's look into making it work properly once people decide to
>> > install Lion."
>> > That was more than three years ago, and since then two major OS X
>> > versions have been released, but unfortunately press and hold is still
>> > not supported.  It would be great to support this feature to make Emacs
>> > more consistent with other apps on OS X.
>>
>> Do we have support for this on free operating systems?  Otherwise, I
>> think the policy is that we can't add it to Emacs.
>
> Probably yes, at least I haven't found similar functionality on free
> windowing systems.

And if that is patented (like the right swipe) then no other system will
be implementing it. Probably, we can think of something better to
achieve the same goal. And make it portably available to all.

One idea:

A new input-method: accented-cycle (C-u C-\ "accented-cycle" RET).

Once you have this input-method selected, then repeating same key will
cycle through the accented options. Ofcourse sometimes it is useful to
cut off input method so that instead of cycling you just repeat the same
character in the typed text. This is already very well documented in the
"(emacs) 22.3 Input Method".

Also, the newly added "transient" input method will also be added help.

So, why "press and hold" when you can simply "glide".





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

* bug#19931: 24.4; Support for OS X press and hold
  2020-12-13  4:11     ` Pankaj Jangid
@ 2020-12-13  8:38       ` Juri Linkov
  2020-12-13  9:41         ` Pankaj Jangid
  0 siblings, 1 reply; 10+ messages in thread
From: Juri Linkov @ 2020-12-13  8:38 UTC (permalink / raw)
  To: Pankaj Jangid; +Cc: Stefan Kangas, Philipp Stephani, 19931

> And if that is patented (like the right swipe) then no other system will
> be implementing it. Probably, we can think of something better to
> achieve the same goal. And make it portably available to all.
>
> One idea:
>
> A new input-method: accented-cycle (C-u C-\ "accented-cycle" RET).
>
> Once you have this input-method selected, then repeating same key will
> cycle through the accented options. Ofcourse sometimes it is useful to
> cut off input method so that instead of cycling you just repeat the same
> character in the typed text. This is already very well documented in the
> "(emacs) 22.3 Input Method".
>
> Also, the newly added "transient" input method will also be added help.
>
> So, why "press and hold" when you can simply "glide".

I don't know how "Press and hold" works on OS X, but it seems it's like
on some smartphone screen virtual keyboards holding down a letter pops up
a list of suggestions with accented letters.  But any postfix input method
in Emacs already works the same way, for example:

  C-\ latin-1-postfix
  a

displays a list of possible accents to select.





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

* bug#19931: 24.4; Support for OS X press and hold
  2020-12-13  8:38       ` Juri Linkov
@ 2020-12-13  9:41         ` Pankaj Jangid
  2020-12-13 21:20           ` Juri Linkov
  2020-12-23 20:51           ` Juri Linkov
  0 siblings, 2 replies; 10+ messages in thread
From: Pankaj Jangid @ 2020-12-13  9:41 UTC (permalink / raw)
  To: Juri Linkov; +Cc: Stefan Kangas, Philipp Stephani, 19931

Juri Linkov <juri@linkov.net> writes:

>> And if that is patented (like the right swipe) then no other system will
>> be implementing it. Probably, we can think of something better to
>> achieve the same goal. And make it portably available to all.
>>
>> One idea:
>>
>> A new input-method: accented-cycle (C-u C-\ "accented-cycle" RET).
>>
>> Once you have this input-method selected, then repeating same key will
>> cycle through the accented options. Ofcourse sometimes it is useful to
>> cut off input method so that instead of cycling you just repeat the same
>> character in the typed text. This is already very well documented in the
>> "(emacs) 22.3 Input Method".
>>
>> Also, the newly added "transient" input method will also be added help.
>>
>> So, why "press and hold" when you can simply "glide".
>
> I don't know how "Press and hold" works on OS X, but it seems it's like
> on some smartphone screen virtual keyboards holding down a letter pops up
> a list of suggestions with accented letters.

Yes exactly similar to that.

> But any postfix input method in Emacs already works the same way, for
> example:
>
>   C-\ latin-1-postfix
>   a
>
> displays a list of possible accents to select.

Yes this almost solves the problem. Just that in case of press-and-hold,
the user doesn’t have to goto another key. The combination is the main
key and arrow-key to select the correct accent.

May be we can have a generic implementation. The next possible keys are
already displayed in the echo area. Pressing the same character key
again cycles through those options.

e e         => ë
e e e       => é
e e e e     => æ
e e e e e   => ê
e e e e e e => è

But, to be honest, I find the postfix implementation to be much faster.





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

* bug#19931: 24.4; Support for OS X press and hold
  2020-12-13  9:41         ` Pankaj Jangid
@ 2020-12-13 21:20           ` Juri Linkov
  2020-12-14  8:35             ` Juri Linkov
  2020-12-23 20:51           ` Juri Linkov
  1 sibling, 1 reply; 10+ messages in thread
From: Juri Linkov @ 2020-12-13 21:20 UTC (permalink / raw)
  To: Pankaj Jangid; +Cc: Stefan Kangas, Philipp Stephani, 19931

>> But any postfix input method in Emacs already works the same way, for
>> example:
>>
>>   C-\ latin-1-postfix
>>   a
>>
>> displays a list of possible accents to select.
>
> Yes this almost solves the problem. Just that in case of press-and-hold,
> the user doesn’t have to goto another key. The combination is the main
> key and arrow-key to select the correct accent.

There are some options in 'quail-define-package', and I recall
that some of them can enable more interactive selection among
displayed variants, but I don't remember what input methods used
such options, and what options of 'quail-define-package' can do this,
maybe 'SHOW-LAYOUT', but I'm not sure.





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

* bug#19931: 24.4; Support for OS X press and hold
  2020-12-13 21:20           ` Juri Linkov
@ 2020-12-14  8:35             ` Juri Linkov
  0 siblings, 0 replies; 10+ messages in thread
From: Juri Linkov @ 2020-12-14  8:35 UTC (permalink / raw)
  To: Pankaj Jangid; +Cc: Stefan Kangas, Philipp Stephani, 19931

>> Yes this almost solves the problem. Just that in case of press-and-hold,
>> the user doesn’t have to goto another key. The combination is the main
>> key and arrow-key to select the correct accent.
>
> There are some options in 'quail-define-package', and I recall
> that some of them can enable more interactive selection among
> displayed variants, but I don't remember what input methods used
> such options, and what options of 'quail-define-package' can do this,
> maybe 'SHOW-LAYOUT', but I'm not sure.

Actually, the interactive selection UI is enabled when a rule contains
a vector of possible variants, e.g.:

(quail-define-rules
 ("a" [?á ?ä]))

then typing "a" displays a list of characters to select.





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

* bug#19931: 24.4; Support for OS X press and hold
  2020-12-13  9:41         ` Pankaj Jangid
  2020-12-13 21:20           ` Juri Linkov
@ 2020-12-23 20:51           ` Juri Linkov
  2020-12-24 20:27             ` Juri Linkov
  1 sibling, 1 reply; 10+ messages in thread
From: Juri Linkov @ 2020-12-23 20:51 UTC (permalink / raw)
  To: Pankaj Jangid; +Cc: 19931, Philipp Stephani, Stefan Kangas

>> I don't know how "Press and hold" works on OS X, but it seems it's like
>> on some smartphone screen virtual keyboards holding down a letter pops up
>> a list of suggestions with accented letters.
>
> Yes exactly similar to that.

I noticed there is already the corresponding item in etc/TODO:

  **** PressAndHold for writing accented character
  On macOS, many application support the press and hold pattern to
  invoke a menu of accented characters.  (See example at
  https://support.apple.com/en-us/HT201586 .)

  Currently, this doesn't work in Emacs.

  Note that "ns-win.el" explicitly disables this.

  Note: This feature might not be allowed to be implemented until also
  implemented in Emacs for a free system.





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

* bug#19931: 24.4; Support for OS X press and hold
  2020-12-23 20:51           ` Juri Linkov
@ 2020-12-24 20:27             ` Juri Linkov
  0 siblings, 0 replies; 10+ messages in thread
From: Juri Linkov @ 2020-12-24 20:27 UTC (permalink / raw)
  To: Pankaj Jangid; +Cc: 19931, Philipp Stephani, Stefan Kangas

>>> I don't know how "Press and hold" works on OS X, but it seems it's like
>>> on some smartphone screen virtual keyboards holding down a letter pops up
>>> a list of suggestions with accented letters.
>>
>> Yes exactly similar to that.
>
> I noticed there is already the corresponding item in etc/TODO:

BTW, there are more related items in etc/TODO.  I don't know
how actual they are.  Maybe some of them are already obsolete?

  ** Add a way to define input methods by computing them
  When an input method is first used, redefine C-x 8 to use a
  user-selected input method, with the default being the union of
  latin-1-prefix and latin-1-postfix.

  ** A more convenient use of input methods in search
  Arrange a way for an input method to return the first character
  immediately, then replace it later.  So that C-s a with input method
  latin-1-postfix would immediately search for an a.

  ** Let LEIM handle the Mode_switch key like XIM does
  I.e. a toggle like C-\ but which can also be used as a modifier.





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

end of thread, other threads:[~2020-12-24 20:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-23 21:05 bug#19931: 24.4; Support for OS X press and hold Philipp Stephani
2020-11-23 14:04 ` Stefan Kangas
2020-12-12 16:52   ` Philipp Stephani
2020-12-13  4:11     ` Pankaj Jangid
2020-12-13  8:38       ` Juri Linkov
2020-12-13  9:41         ` Pankaj Jangid
2020-12-13 21:20           ` Juri Linkov
2020-12-14  8:35             ` Juri Linkov
2020-12-23 20:51           ` Juri Linkov
2020-12-24 20:27             ` Juri Linkov

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).