* Bind right shift and TAB won't work
@ 2013-05-11 21:48 Emanuel Berg
2013-05-11 22:43 ` Drew Adams
` (3 more replies)
0 siblings, 4 replies; 26+ messages in thread
From: Emanuel Berg @ 2013-05-11 21:48 UTC (permalink / raw)
To: help-gnu-emacs
In w3m, I'd like to iterate anchors backwards with (right) shift and
TAB. I tried both below approaches but behaviour suggests that Emacs
doesn't sense the shift (or ignores it) when combined with TAB. C-h k
also displays the documentation for plain TAB.
(local-set-key (kbd "S-TAB") 'w3m-previous-anchor)
(local-set-key (kbd "<backtab>") 'w3m-previous-anchor)
PS. Does this group have a FAQ? DS.
--
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573
^ permalink raw reply [flat|nested] 26+ messages in thread
* RE: Bind right shift and TAB won't work
2013-05-11 21:48 Bind right shift and TAB won't work Emanuel Berg
@ 2013-05-11 22:43 ` Drew Adams
[not found] ` <mailman.25578.1368312212.855.help-gnu-emacs@gnu.org>
` (2 subsequent siblings)
3 siblings, 0 replies; 26+ messages in thread
From: Drew Adams @ 2013-05-11 22:43 UTC (permalink / raw)
To: 'Emanuel Berg', help-gnu-emacs
> In w3m, I'd like to iterate anchors backwards with (right) shift and
> TAB. I tried both below approaches but behaviour suggests that Emacs
> doesn't sense the shift (or ignores it) when combined with TAB. C-h k
> also displays the documentation for plain TAB.
>
> (local-set-key (kbd "S-TAB") 'w3m-previous-anchor)
> (local-set-key (kbd "<backtab>") 'w3m-previous-anchor)
>
> PS. Does this group have a FAQ? DS.
A FAQ? No. But it has an archive:
http://lists.gnu.org/archive/html/help-gnu-emacs/
Emacs has a FAQ:
http://www.gnu.org/software/emacs/emacs-faq.html
When you do `C-h k' and then hold the right Shift key and hit the Tab key, just
what does it say wrt the key sequence you used (forgetting about the binding for
now)?
Does it think that you hit only TAB? If so, that is what your keyboard is
sending, I think. Does the right Shift key work for you otherwise, i.e., in
general?
What happens when you do the same thing, but you use the left Shift key?
What happens if you try using `global-set-key', just to see? Same problem?
AFAIK, there is no way to distinguish the left and right Shift keys, and either
should work fine with the code you tried.
You can also try (kbd "<S-tab>") and (kbd "<S-iso-lefttab>"). But it sounds
like your keyboard is not sending what's needed from the right Shift key.
Maybe someone else has an idea.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Bind right shift and TAB won't work
[not found] ` <mailman.25578.1368312212.855.help-gnu-emacs@gnu.org>
@ 2013-05-12 7:15 ` Emanuel Berg
2013-05-12 14:57 ` Peter Dyballa
` (3 more replies)
0 siblings, 4 replies; 26+ messages in thread
From: Emanuel Berg @ 2013-05-12 7:15 UTC (permalink / raw)
To: help-gnu-emacs
"Drew Adams" <drew.adams@oracle.com> writes:
> Emacs has a FAQ:
> http://www.gnu.org/software/emacs/emacs-faq.html
Yes, but I was wondering more if there were any guidelines how to
interact in this very group. Like how much context to provide, and
stuff like that. If you use some special notation to highlight
commands. Etc.
> When you do `C-h k' and then hold the right Shift key and hit the
> Tab key, just what does it say wrt the key sequence you used
> (forgetting about the binding for now)? Does it think that you hit
> only TAB?
Yes.
> If so, that is what your keyboard is sending, I think. Does the
> right Shift key work for you otherwise, i.e., in general?
Yes, in X and Iceweasel it works as I try to set it up, in w3m. I
don't know how to test for it in the console? showkey (in the console)
shows both (but separately), if that's a clue.
> What happens when you do the same thing, but you use the left Shift
> key?
The same: TAB.
> What happens if you try using `global-set-key', just to see? Same
> problem?
Yes.
> AFAIK, there is no way to distinguish the left and right Shift keys,
> and either should work fine with the code you tried.
OK, so that's consistent, because neither works.
> You can also try (kbd "<S-tab>") and (kbd "<S-iso-lefttab>").
Those won't work either. But thanks for a gutsy effort.
> Maybe someone else has an idea.
Let's hope so :)
FYI, you also emailed me your answer. I don't know if that is custom
(or even a slip) but anyway, it is not needed as I am happy to use
Gnus for Usenet.
--
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Bind right shift and TAB won't work
2013-05-11 21:48 Bind right shift and TAB won't work Emanuel Berg
2013-05-11 22:43 ` Drew Adams
[not found] ` <mailman.25578.1368312212.855.help-gnu-emacs@gnu.org>
@ 2013-05-12 8:53 ` Peter Dyballa
[not found] ` <mailman.25595.1368348824.855.help-gnu-emacs@gnu.org>
3 siblings, 0 replies; 26+ messages in thread
From: Peter Dyballa @ 2013-05-12 8:53 UTC (permalink / raw)
To: Emanuel Berg; +Cc: help-gnu-emacs
Am 11.05.2013 um 23:48 schrieb Emanuel Berg:
> I tried both below approaches but behaviour suggests that Emacs
> doesn't sense the shift (or ignores it) when combined with TAB.
When you're doing this in terminal it's likely that GNU Emacs cannot see a difference.
One way to determine what GNU Emacs receives is to type in *scratch* buffer the key combinations you want to bind to keys and then invoke C-h l. This opens a new buffer which lists the input events.
--
Greetings
Pete
Eternity is a terrible thought. I mean, where's it going to end?
- Tom Stoppard
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Bind right shift and TAB won't work
[not found] ` <mailman.25595.1368348824.855.help-gnu-emacs@gnu.org>
@ 2013-05-12 9:27 ` Emanuel Berg
2013-05-12 15:05 ` Peter Dyballa
[not found] ` <mailman.25600.1368371123.855.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 26+ messages in thread
From: Emanuel Berg @ 2013-05-12 9:27 UTC (permalink / raw)
To: help-gnu-emacs
Peter Dyballa <Peter_Dyballa@Web.DE> writes:
> One way to determine what GNU Emacs receives is to type in *scratch*
> buffer the key combinations you want to bind to keys and then invoke
> C-h l. This opens a new buffer which lists the input events.
Yes: there is only TAB. But didn't we we know that already from C-h k,
or do those two methods use different "sources"? Anyway, nice to
learn.
--
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Bind right shift and TAB won't work
2013-05-12 7:15 ` Emanuel Berg
@ 2013-05-12 14:57 ` Peter Dyballa
2013-05-12 15:37 ` Drew Adams
` (2 subsequent siblings)
3 siblings, 0 replies; 26+ messages in thread
From: Peter Dyballa @ 2013-05-12 14:57 UTC (permalink / raw)
To: Emanuel Berg; +Cc: help-gnu-emacs
Am 12.05.2013 um 09:15 schrieb Emanuel Berg:
> FYI, you also emailed me your answer. I don't know if that is custom
> (or even a slip) but anyway, it is not needed as I am happy to use
> Gnus for Usenet.
Most eMail programmes only reply to the sender, when one presses the "Reply" button. Nothing will be visible on the list and others might continue to send replies because obviously the message was not answered yet. So one's usually replying to all…
--
Greetings
Pete
To drink without thirst and to make love all the time, madam, it is only these which distinguish us from the other beasts.
– Beaumarchais
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Bind right shift and TAB won't work
2013-05-12 9:27 ` Emanuel Berg
@ 2013-05-12 15:05 ` Peter Dyballa
[not found] ` <mailman.25600.1368371123.855.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 26+ messages in thread
From: Peter Dyballa @ 2013-05-12 15:05 UTC (permalink / raw)
To: Emanuel Berg; +Cc: help-gnu-emacs
Am 12.05.2013 um 11:27 schrieb Emanuel Berg:
> Peter Dyballa <Peter_Dyballa@Web.DE> writes:
>
>> One way to determine what GNU Emacs receives is to type in *scratch*
>> buffer the key combinations you want to bind to keys and then invoke
>> C-h l. This opens a new buffer which lists the input events.
>
> Yes: there is only TAB. But didn't we we know that already from C-h k,
> or do those two methods use different "sources"? Anyway, nice to
> learn.
C-h k, I think, can be fooled when you have a keyboard translation active (so best used when GNU Emacs is launched with -Q). The lowest level, besides using xev, is pressing C-q and then your key combination.
--
Greetings
Pete
The box said "Use Windows 95 or better," so I got a Macintosh.
^ permalink raw reply [flat|nested] 26+ messages in thread
* RE: Bind right shift and TAB won't work
2013-05-12 7:15 ` Emanuel Berg
2013-05-12 14:57 ` Peter Dyballa
@ 2013-05-12 15:37 ` Drew Adams
[not found] ` <mailman.25599.1368370687.855.help-gnu-emacs@gnu.org>
[not found] ` <mailman.25602.1368373047.855.help-gnu-emacs@gnu.org>
3 siblings, 0 replies; 26+ messages in thread
From: Drew Adams @ 2013-05-12 15:37 UTC (permalink / raw)
To: 'Emanuel Berg', help-gnu-emacs
> > Emacs has a FAQ: http://www.gnu.org/software/emacs/emacs-faq.html
>
> Yes, but I was wondering more if there were any guidelines how to
> interact in this very group. Like how much context to provide, and
> stuff like that. If you use some special notation to highlight
> commands. Etc.
Dunno. I probably should know, but I don't. I looked here, but it doesn't lead
to any such guidelines, AFAICT: http://lists.gnu.org/.
This is a help list, so pretty much anything you write will be OK.
The preference is for plain text, not HTML mail. Other than that, trying to
provide clear & complete info in your questions is helpful, as is referring to
specific doc sections or specific recipes to reproduce behavior, when
appropriate.
Perhaps someone else can point you to some guidelines for the list somewhere.
> > When you do `C-h k' and then hold the right Shift key and hit the
> > Tab key, just what does it say wrt the key sequence you used
> > (forgetting about the binding for now)? Does it think that you hit
> > only TAB?
>
> Yes.
>
> > If so, that is what your keyboard is sending, I think. Does the
> > right Shift key work for you otherwise, i.e., in general?
>
> Yes, in X and Iceweasel it works as I try to set it up, in w3m.
What about in Emacs, besides w3m? If you start Emacs with `emacs -Q' and then
check `C-h k' with Shift + Tab, do you see the same thing: no recognition of
Shift?
Check too whether `C-h k' does recognize that Shift was pressed and just says
that Shift + Tab was translated to TAB. If so, that's different from not
receiving the Shift modifier at all. E.g., for me, after `emacs -Q', `C-h k'
tells me this for `S-TAB':
<backtab (translated from <S-tab>) is undefined
^^^^^^^^^^^^^^^^^^^^^^^^^
> I don't know how to test for it in the console? showkey (in the console)
> shows both (but separately), if that's a clue.
Someone else can perhaps help with that.
> > What happens when you do the same thing, but you use the left Shift
> > key?
>
> The same: TAB.
>
> > What happens if you try using `global-set-key', just to see? Same
> > problem?
>
> Yes.
>
> > AFAIK, there is no way to distinguish the left and right Shift keys,
> > and either should work fine with the code you tried.
>
> OK, so that's consistent, because neither works.
>
> > You can also try (kbd "<S-tab>") and (kbd "<S-iso-lefttab>").
>
> Those won't work either. But thanks for a gutsy effort.
>
> > Maybe someone else has an idea.
>
> Let's hope so :)
>
> FYI, you also emailed me your answer. I don't know if that is custom
> (or even a slip) but anyway, it is not needed as I am happy to use
> Gnus for Usenet.
I hit `Reply All', because I didn't want to reply only to you. I could have
edited the `To:' list to remove you and reply only to the list. But some people
who submit questions do not read the list.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Bind right shift and TAB won't work
[not found] ` <mailman.25599.1368370687.855.help-gnu-emacs@gnu.org>
@ 2013-05-12 20:56 ` Emanuel Berg
2013-05-13 8:23 ` Bob Proulx
0 siblings, 1 reply; 26+ messages in thread
From: Emanuel Berg @ 2013-05-12 20:56 UTC (permalink / raw)
To: help-gnu-emacs
Peter Dyballa <Peter_Dyballa@Web.DE> writes:
> Most eMail programmes only reply to the sender, when one presses the
> "Reply" button. Nothing will be visible on the list and others might
> continue to send replies because obviously the message was not
> answered yet. So one's usually replying to all...
Aha, as this was an Emacs group, I assumed everyone used Gnus to
access this group. I didn't know email clients were an
alternative. Well, I guess it is no big inconvenience for me removing
those surplus emails.
--
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Bind right shift and TAB won't work
[not found] ` <mailman.25600.1368371123.855.help-gnu-emacs@gnu.org>
@ 2013-05-12 21:08 ` Emanuel Berg
2013-05-13 8:33 ` Bob Proulx
` (3 more replies)
0 siblings, 4 replies; 26+ messages in thread
From: Emanuel Berg @ 2013-05-12 21:08 UTC (permalink / raw)
To: help-gnu-emacs
Peter Dyballa <Peter_Dyballa@Web.DE> writes:
> C-h k, I think, can be fooled when you have a keyboard translation
> active (so best used when GNU Emacs is launched with -Q).
The result is still TAB (and only TAB).
> The lowest level, besides using xev, is pressing C-q and then your
> key combination.
Yeah, can you use xev in the console?
C-q doesn't notice the news either: I hold shift, but only TAB shows.
--
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Bind right shift and TAB won't work
[not found] ` <mailman.25602.1368373047.855.help-gnu-emacs@gnu.org>
@ 2013-05-12 21:23 ` Emanuel Berg
2013-05-13 5:29 ` Drew Adams
[not found] ` <mailman.25622.1368422975.855.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 26+ messages in thread
From: Emanuel Berg @ 2013-05-12 21:23 UTC (permalink / raw)
To: help-gnu-emacs
"Drew Adams" <drew.adams@oracle.com> writes:
> What about in Emacs, besides w3m? If you start Emacs with `emacs
> -Q' and then check `C-h k' with Shift + Tab, do you see the same
> thing: no recognition of Shift?
With `emacs -Q', there is no recognition in the help (`C-h k') and
only TABs are in `C-h l'.
> Check too whether `C-h k' does recognize that Shift was pressed and
> just says that Shift + Tab was translated to TAB.
OK, how do I check that?
--
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573
^ permalink raw reply [flat|nested] 26+ messages in thread
* RE: Bind right shift and TAB won't work
2013-05-12 21:23 ` Emanuel Berg
@ 2013-05-13 5:29 ` Drew Adams
[not found] ` <mailman.25622.1368422975.855.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 26+ messages in thread
From: Drew Adams @ 2013-05-13 5:29 UTC (permalink / raw)
To: 'Emanuel Berg', help-gnu-emacs
> > Check too whether `C-h k' does recognize that Shift was pressed and
> > just says that Shift + Tab was translated to TAB.
>
> OK, how do I check that?
I showed you, in the very next sentence:
If so, that's different from not receiving the Shift modifier
at all. E.g., for me, after `emacs -Q', `C-h k' tells me this
for `S-TAB':
<backtab (translated from <S-tab>) is undefined
^^^^^^^^^^^^^^^^^^^^^^^^^
That is what I see, with emacs -Q. If you are not seeing the part in parens
then I'd guess that Emacs is not seeing the Shift press at all. Someone more
knowledgable can perhaps help you further with this.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Bind right shift and TAB won't work
2013-05-12 20:56 ` Emanuel Berg
@ 2013-05-13 8:23 ` Bob Proulx
0 siblings, 0 replies; 26+ messages in thread
From: Bob Proulx @ 2013-05-13 8:23 UTC (permalink / raw)
To: help-gnu-emacs
Emanuel Berg wrote:
> Aha, as this was an Emacs group, I assumed everyone used Gnus to
> access this group. I didn't know email clients were an
> alternative. Well, I guess it is no big inconvenience for me removing
> those surplus emails.
You are apparently reading these messages as the gnu.emacs.help
newsgroup. So to you it appears to be a newsgroup. I am reading
these messages as the help-gnu-emacs@gnu.org mailing list. To me it
appears as a mailing list. The problem is that it is both.
The problem is that some years ago the mailing list and the news group
were gatewayed together using a mail2news / news2mail gateway program.
Email to the mailing list is sent to the newsgroup. Postings to the
newsgroup are emailed to the mailing list. I think that is a bad idea
because it causes each to have the problems of the other. But I am
often outvoted. Here is a reference:
https://lists.gnu.org/mailman/listinfo/help-gnu-emacs
When you post to the newsgroup then it will be emailed to the mailing
list. When we read it on the mailing list if we reply-all then it
will be sent to you directly and to the mailing list too. If you read
my other posting it explains why people reply-all to the mailing
list.
Bob
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Bind right shift and TAB won't work
2013-05-12 21:08 ` Emanuel Berg
@ 2013-05-13 8:33 ` Bob Proulx
2013-05-13 20:50 ` oitofelix
[not found] ` <mailman.25684.1368478466.855.help-gnu-emacs@gnu.org>
2013-05-13 9:05 ` Peter Dyballa
` (2 subsequent siblings)
3 siblings, 2 replies; 26+ messages in thread
From: Bob Proulx @ 2013-05-13 8:33 UTC (permalink / raw)
To: help-gnu-emacs
Emanuel Berg wrote:
> Peter Dyballa writes:
> > C-h k, I think, can be fooled when you have a keyboard translation
> > active (so best used when GNU Emacs is launched with -Q).
>
> The result is still TAB (and only TAB).
If you are using a terminal emulator then the result depends upon the
emulator. Xterm for instance sends Shift-TAB as an ESC [ Z terminal
escape sequence. Many others to do. But some do not.
> > The lowest level, besides using xev, is pressing C-q and then your
> > key combination.
>
> Yeah, can you use xev in the console?
No. People are assuming that you are running the X graphical display
of Emacs. I think you are using the standard terminal interface.
With X emacs can detect every key. With a terminal Emacs has nothing
to do with keys and it is the terminal emulators job to detect keys
and to produce characters. The emulation may not be implementing all
of the usual key combinations. S-TAB (aka backtab) is usually
imlemented with ESC [ Z.
> C-q doesn't notice the news either: I hold shift, but only TAB shows.
I think you must be either using the Linux vt virtual console or are
using a terminal emulator that does not implement S-TAB. If you are
using a Linux virtual console there isn't any way around this without
patching Linux. If you are using an X terminal emulator then try
using Xterm and it should work for you.
Bob
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Bind right shift and TAB won't work
2013-05-12 21:08 ` Emanuel Berg
2013-05-13 8:33 ` Bob Proulx
@ 2013-05-13 9:05 ` Peter Dyballa
[not found] ` <mailman.25627.1368435961.855.help-gnu-emacs@gnu.org>
[not found] ` <mailman.25626.1368434033.855.help-gnu-emacs@gnu.org>
3 siblings, 0 replies; 26+ messages in thread
From: Peter Dyballa @ 2013-05-13 9:05 UTC (permalink / raw)
To: Emanuel Berg; +Cc: help-gnu-emacs
Am 12.05.2013 um 23:08 schrieb Emanuel Berg:
> Yeah, can you use xev in the console?
Yes: xev &; it will record all keyboard actions like pressing or releasing a key. At least, when X11 is running.
>
> C-q doesn't notice the news either: I hold shift, but only TAB shows.
In the console or any other terminal emulator you won't have as many "keyboard events" as in a windowing system. The latter can construct any number of synthetic events, the former at least sometimes allows for additional keyboard codes via X resources or such. One of my terminal emulations for example sends, via such a preference, "ESC [ Z" when I press S-TAB…
--
Greetings
Pete
I wouldn't recommend sex, drugs or insanity for everyone, but they've always worked for me.
– Hunter S. Thompson
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Bind right shift and TAB won't work
[not found] ` <mailman.25627.1368435961.855.help-gnu-emacs@gnu.org>
@ 2013-05-13 14:25 ` Barry Margolin
2013-05-13 16:13 ` Emanuel Berg
2013-05-13 16:38 ` Peter Dyballa
2013-05-13 16:06 ` Emanuel Berg
1 sibling, 2 replies; 26+ messages in thread
From: Barry Margolin @ 2013-05-13 14:25 UTC (permalink / raw)
To: help-gnu-emacs
In article <mailman.25627.1368435961.855.help-gnu-emacs@gnu.org>,
Peter Dyballa <Peter_Dyballa@Web.DE> wrote:
> Am 12.05.2013 um 23:08 schrieb Emanuel Berg:
>
> > Yeah, can you use xev in the console?
>
> Yes: xev &; it will record all keyboard actions like pressing or releasing a
> key. At least, when X11 is running.
I think "in the console" means that X is *not* running.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Bind right shift and TAB won't work
[not found] ` <mailman.25626.1368434033.855.help-gnu-emacs@gnu.org>
@ 2013-05-13 15:59 ` Emanuel Berg
0 siblings, 0 replies; 26+ messages in thread
From: Emanuel Berg @ 2013-05-13 15:59 UTC (permalink / raw)
To: help-gnu-emacs
Bob Proulx <bob@proulx.com> writes:
> I think you must be either using the Linux vt virtual console or are
> using a terminal emulator that does not implement S-TAB. If you are
> using a Linux virtual console there isn't any way around this
> without patching Linux.
Correct, I'm using Emacs in "the console" (the Linux VTs, or tty:s). I
think I said that but maybe I didn't, or perhaps not clear
enough. Anyway, I didn't know that the terminal (or terminal emulator
in X) had an impact on this, but now that you say it, it makes
sense. I don't think it is worth the effort to patch the kernel just
for this; I'll find another keystroke to do the job. Thanks for the
clarification on this, and on the Gnus/mail-list issue.
--
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Bind right shift and TAB won't work
[not found] ` <mailman.25627.1368435961.855.help-gnu-emacs@gnu.org>
2013-05-13 14:25 ` Barry Margolin
@ 2013-05-13 16:06 ` Emanuel Berg
1 sibling, 0 replies; 26+ messages in thread
From: Emanuel Berg @ 2013-05-13 16:06 UTC (permalink / raw)
To: help-gnu-emacs
Peter Dyballa <Peter_Dyballa@Web.DE> writes:
> Yes: xev &; it will record all keyboard actions like pressing or
> releasing a key. At least, when X11 is running.
I got `xev -display ":0" &' to work but it only records X
events. Perhaps `showkey' can be used but in its base form it only
reports individual keystrokes: left shift is 42, right is 54.
--
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Bind right shift and TAB won't work
2013-05-13 14:25 ` Barry Margolin
@ 2013-05-13 16:13 ` Emanuel Berg
2013-05-13 18:09 ` Bob Proulx
2013-05-13 16:38 ` Peter Dyballa
1 sibling, 1 reply; 26+ messages in thread
From: Emanuel Berg @ 2013-05-13 16:13 UTC (permalink / raw)
To: help-gnu-emacs
Barry Margolin <barmar@alum.mit.edu> writes:
> I think "in the console" means that X is *not* running.
Well, my question was on Emacs, which I run in the console (/dev/tty1,
a Linux VT) - and I almost never leave Emacs - *but*, I actually do
have an X server running. And, this is sometimes useful even for
CLI-only purposes. For example, I use the X clipboard to copy and
paste from one tty into another. As it shows on `where xo' (and `xi')
in zsh:
xo: aliased to xclip -d ":0" -selection clipboard -o
xi: aliased to xclip -d ":0" -selection clipboard
Perhaps there is a better way to do this (with screen?), but just to
illustrate how X can be useful even when you are not "using" it. I
thought it was kind of cute, anyway.
--
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Bind right shift and TAB won't work
[not found] ` <mailman.25622.1368422975.855.help-gnu-emacs@gnu.org>
@ 2013-05-13 16:18 ` Emanuel Berg
0 siblings, 0 replies; 26+ messages in thread
From: Emanuel Berg @ 2013-05-13 16:18 UTC (permalink / raw)
To: help-gnu-emacs
"Drew Adams" <drew.adams@oracle.com> writes:
> I showed you, in the very next sentence:
Aha, I thought that was some third method apart from `C-h k' and `C-h
l' (after `emacs -Q'). But I read your entire message.
> If you are not seeing the part in parens then I'd guess that Emacs
> is not seeing the Shift press at all.
No, not in combination with TAB.
--
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Bind right shift and TAB won't work
2013-05-13 14:25 ` Barry Margolin
2013-05-13 16:13 ` Emanuel Berg
@ 2013-05-13 16:38 ` Peter Dyballa
1 sibling, 0 replies; 26+ messages in thread
From: Peter Dyballa @ 2013-05-13 16:38 UTC (permalink / raw)
To: Barry Margolin; +Cc: help-gnu-emacs
Am 13.05.2013 um 16:25 schrieb Barry Margolin:
> I think "in the console" means that X is *not* running.
Isn't this *on* the console? But I can understand that some folks never experienced the luxury of X11…
--
Greetings
Pete
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
– Rich Cook
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Bind right shift and TAB won't work
2013-05-13 16:13 ` Emanuel Berg
@ 2013-05-13 18:09 ` Bob Proulx
2013-05-14 0:53 ` oitofelix
[not found] ` <mailman.25694.1368499364.855.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 26+ messages in thread
From: Bob Proulx @ 2013-05-13 18:09 UTC (permalink / raw)
To: help-gnu-emacs
Emanuel Berg wrote:
> ... *but*, I actually do have an X server running. And, this is
> sometimes useful even for CLI-only purposes. For example, I use the
> X clipboard to copy and paste from one tty into another. As it shows
> on `where xo' (and `xi')
> in zsh:
>
> xo: aliased to xclip -d ":0" -selection clipboard -o
> xi: aliased to xclip -d ":0" -selection clipboard
>
> Perhaps there is a better way to do this (with screen?), but just to
> illustrate how X can be useful even when you are not "using" it. I
> thought it was kind of cute, anyway.
That is a clever hack. :-)
However by the time you are doing that you could also simply store the
cut and paste text in a file too. Since you aren't using X otherwise.
It would be no different then. Right? Just save the text to a file
and then copy from it.
alias xo='cat ~/.clipboard'
alias xi='cat > ~/.clipboard'
Although I would probably write them as shell scripts so that I could
call them from anywhere.
(BTW... I am still impressed by the clever hack to use the X server
when otherwise not using it. [smile])
Bob
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Bind right shift and TAB won't work
2013-05-13 8:33 ` Bob Proulx
@ 2013-05-13 20:50 ` oitofelix
[not found] ` <mailman.25684.1368478466.855.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 26+ messages in thread
From: oitofelix @ 2013-05-13 20:50 UTC (permalink / raw)
To: help-gnu-emacs
Bob Proulx <bob@proulx.com> writes:
> I think you must be either using the Linux vt virtual console or are
> using a terminal emulator that does not implement S-TAB. If you are
> using a Linux virtual console there isn't any way around this without
> patching Linux.
It is not true. I have setup my console (kernel and xterm) Emacs' frames
to work almost identical to the X Window ones. Let's attack the kernel
console issue. The trick is to use kernel keymaps. Here is how it
works for the specific problem being discussed (the <backtab>
detection):
1. Discover what is your Tab key code using the command line program
`showkey'. Mine is 15; so, let's suppose also it is yours.
2. Create a keymap that include your base keymap and maps the shifted
Tab key to some unicode character (take a look at keymaps(5) man
page). Let's suppose that your current keymap is the US one
(/lib/kbd/keymaps/i386/qwerty/us.map.gz) and you want to map to the
U+010E character. Thus, your keymap will be like this:
--- begin emacs.map ---
include "/lib/kbd/keymaps/i386/qwerty/us.map.gz"
shift keycode 15 = U+010E # <backtab>
--- end emacs.map ---
3. Load your new keymap using the command-line program `loadkeys'. Make
that command to be invoked on system start-up (put it in some rc init
script). Now when you press <Shift>+<Tab> you should see a funny
character showing up on your console. The comment at the keymap's
second line remember us the purpose of that mapping and that we need
to configure the Emacs side. It lead us to the next step.
4. Now when you type `C-h c' followed by <Shift>+<Tab> you will realize
that Emacs can now detect your key press. The remaining procedure is
to map that unicode character to the input event we are interested
in. For this just make Emacs evaluate the following expression on
start-up (put it in .emacs, for example).
(define-key input-decode-map [?\u010E] [backtab])
And that is all. The xterm approach is similar and based on the same
principles. I hope it helps.
--
,= ,-_-. =. There is no system but GNU;
((_/)o o(\_)) Linux-libre is just one of its kernels;
`-'(. .)`-' Emacs is the only true editor;
\_/ All software should be free as in freedom;
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Bind right shift and TAB won't work
[not found] ` <mailman.25684.1368478466.855.help-gnu-emacs@gnu.org>
@ 2013-05-13 23:36 ` Emanuel Berg
0 siblings, 0 replies; 26+ messages in thread
From: Emanuel Berg @ 2013-05-13 23:36 UTC (permalink / raw)
To: help-gnu-emacs
oitofelix@riseup.net writes:
> ... And that is all.
That is not "all", that is *great*!
--
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Bind right shift and TAB won't work
2013-05-13 18:09 ` Bob Proulx
@ 2013-05-14 0:53 ` oitofelix
[not found] ` <mailman.25694.1368499364.855.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 26+ messages in thread
From: oitofelix @ 2013-05-14 0:53 UTC (permalink / raw)
To: help-gnu-emacs
Emanuel Berg wrote:
> ... *but*, I actually do have an X server running. And, this is
> sometimes useful even for CLI-only purposes. For example, I use the
> X clipboard to copy and paste from one tty into another. As it shows
> on `where xo' (and `xi')
> in zsh:
>
> xo: aliased to xclip -d ":0" -selection clipboard -o
> xi: aliased to xclip -d ":0" -selection clipboard
>
> Perhaps there is a better way to do this (with screen?), but just to
> illustrate how X can be useful even when you are not "using" it. I
> thought it was kind of cute, anyway.
Besides using `xclip' and `screen', if you have a mouse and are running
GNU+Linux-libre operating system you can use GPM. It does not need X
and it is described by the author as
"a cut and paste utility and mouse server for virtual consoles"
On the other hand it is described by its Debian maintainer as:
"By default, the daemon provides a 'selection' mode, so that
cut-and-paste with the mouse works on the console just as it does
under X."
Here is the home page: http://www.nico.schottelius.org/software/gpm/
If you are using a GNU+Linux-libre distribution it is likely to be in
its repository system.
--
,= ,-_-. =. There is no system but GNU;
((_/)o o(\_)) Linux-libre is just one of its kernels;
`-'(. .)`-' Emacs is the only true editor;
\_/ All software should be free as in freedom;
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Bind right shift and TAB won't work
[not found] ` <mailman.25694.1368499364.855.help-gnu-emacs@gnu.org>
@ 2013-05-15 14:33 ` Emanuel Berg
0 siblings, 0 replies; 26+ messages in thread
From: Emanuel Berg @ 2013-05-15 14:33 UTC (permalink / raw)
To: help-gnu-emacs
oitofelix <oitofelix@riseup.net> writes:
> Besides using `xclip' and `screen', if you have a mouse and are
> running GNU+Linux-libre operating system you can use GPM.
Thanks, but a mouse - no way. I never want my hands to move away from
the keyboard. And by the "keyboard", I exclude the functions keys (F1,
F2, etc.), the arrow keys, and the numpad. That's one of the main
reasons I like Emacs so much: C-f instead of right arrow, and so
on. What's not like that (in Emacs), I can rebind.
--
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573
^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2013-05-15 14:33 UTC | newest]
Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-11 21:48 Bind right shift and TAB won't work Emanuel Berg
2013-05-11 22:43 ` Drew Adams
[not found] ` <mailman.25578.1368312212.855.help-gnu-emacs@gnu.org>
2013-05-12 7:15 ` Emanuel Berg
2013-05-12 14:57 ` Peter Dyballa
2013-05-12 15:37 ` Drew Adams
[not found] ` <mailman.25599.1368370687.855.help-gnu-emacs@gnu.org>
2013-05-12 20:56 ` Emanuel Berg
2013-05-13 8:23 ` Bob Proulx
[not found] ` <mailman.25602.1368373047.855.help-gnu-emacs@gnu.org>
2013-05-12 21:23 ` Emanuel Berg
2013-05-13 5:29 ` Drew Adams
[not found] ` <mailman.25622.1368422975.855.help-gnu-emacs@gnu.org>
2013-05-13 16:18 ` Emanuel Berg
2013-05-12 8:53 ` Peter Dyballa
[not found] ` <mailman.25595.1368348824.855.help-gnu-emacs@gnu.org>
2013-05-12 9:27 ` Emanuel Berg
2013-05-12 15:05 ` Peter Dyballa
[not found] ` <mailman.25600.1368371123.855.help-gnu-emacs@gnu.org>
2013-05-12 21:08 ` Emanuel Berg
2013-05-13 8:33 ` Bob Proulx
2013-05-13 20:50 ` oitofelix
[not found] ` <mailman.25684.1368478466.855.help-gnu-emacs@gnu.org>
2013-05-13 23:36 ` Emanuel Berg
2013-05-13 9:05 ` Peter Dyballa
[not found] ` <mailman.25627.1368435961.855.help-gnu-emacs@gnu.org>
2013-05-13 14:25 ` Barry Margolin
2013-05-13 16:13 ` Emanuel Berg
2013-05-13 18:09 ` Bob Proulx
2013-05-14 0:53 ` oitofelix
[not found] ` <mailman.25694.1368499364.855.help-gnu-emacs@gnu.org>
2013-05-15 14:33 ` Emanuel Berg
2013-05-13 16:38 ` Peter Dyballa
2013-05-13 16:06 ` Emanuel Berg
[not found] ` <mailman.25626.1368434033.855.help-gnu-emacs@gnu.org>
2013-05-13 15:59 ` Emanuel Berg
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.