* Shift on console
@ 2008-03-16 18:34 Robert J. Chassell
2008-03-16 19:23 ` Alan Mackenzie
0 siblings, 1 reply; 4+ messages in thread
From: Robert J. Chassell @ 2008-03-16 18:34 UTC (permalink / raw)
To: emacs-devel
Shift fails on my console. I cannot run C-M-S-v
(scroll-other-window-down) on it although I can run it on both an
Xterm and on RXVT
Today's GNU Emacs CVS snapshot, Sun, 2008 Mar 16 10:46 UTC
GNU Emacs 23.0.60.22 (i686-pc-linux-gnu, GTK+ Version 2.12.5)
started with
src/emacs -q in the console
started with
src/emacs -q -nbc -nw in the Xterm and on RXVT
All as a regular user using BASH.
--
Robert J. Chassell GnuPG Key ID: 004B4AC8
bob@rattlesnake.com bob@gnu.org
http://www.rattlesnake.com http://www.teak.cc
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Shift on console
2008-03-16 18:34 Shift on console Robert J. Chassell
@ 2008-03-16 19:23 ` Alan Mackenzie
2008-03-17 0:49 ` Robert J. Chassell
0 siblings, 1 reply; 4+ messages in thread
From: Alan Mackenzie @ 2008-03-16 19:23 UTC (permalink / raw)
To: Robert J. Chassell; +Cc: emacs-devel
'Evening, Robert!
On Sun, Mar 16, 2008 at 06:34:42PM +0000, Robert J. Chassell wrote:
> Shift fails on my console.
Where "console" = ????
I have had this problem on my GNU tty (which might be the same as your
console, but probably isn't).
> I cannot run C-M-S-v
> (scroll-other-window-down) on it although I can run it on both an
> Xterm and on RXVT
On a GNU tty, this has the same cause as not having C-<up> or M-<down>:
the standard keyboard layout discards the modifier keys. :-(
The solution is to add stuff to a keymap (in the sense of Linux's
loadkeys) and add stuff to Emacs's function-key-map to parse this. For
example, I've got the following lines in my boottime.kmap.gz for
C-M-S-a:
keycode 30 = a
AltGr keycode 30 = +adiaeresis # ä ACM 11/7/99
Shift AltGr keycode 30 = +Adiaeresis # Ä ACM 11/7/99
control alt shift keycode 30 = F214 <================
.........
string F214 = "\033[7>a" # Control+Alt+Shift+a
> All as a regular user using BASH.
This problem is going to become really problematic if "shift-movement
selection" becomes the Emacs default".
[ .... ]
> Robert J. Chassell GnuPG Key ID: 004B4AC8
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Shift on console
2008-03-16 19:23 ` Alan Mackenzie
@ 2008-03-17 0:49 ` Robert J. Chassell
2008-03-17 23:31 ` Alan Mackenzie
0 siblings, 1 reply; 4+ messages in thread
From: Robert J. Chassell @ 2008-03-17 0:49 UTC (permalink / raw)
To: emacs-devel
Alan Mackenzie <acm@muc.de> asked
Where "console" = ????
/dev/tty2, also known by the Debian folks and others as a `virtual
console'. It does not have X or any other windowing system and is
what we once called a `terminal'.
This problem is going to become really problematic if "shift-movement
selection" becomes the Emacs default".
Perhaps others expect a graphical windowing environment in all
circumstances.
When I SSH to gnu.org and log into it with an RXVT shell on my local
machine, and invoke Emacs on fp.gnu.org, I can run C-M-S-v
(scroll-other-window-down), that is to say, the shift key succeeds;
but when I do the same in a plain console -- no RXVT shell -- I
cannot.
--
Robert J. Chassell GnuPG Key ID: 004B4AC8
bob@rattlesnake.com bob@gnu.org
http://www.rattlesnake.com http://www.teak.cc
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Shift on console
2008-03-17 0:49 ` Robert J. Chassell
@ 2008-03-17 23:31 ` Alan Mackenzie
0 siblings, 0 replies; 4+ messages in thread
From: Alan Mackenzie @ 2008-03-17 23:31 UTC (permalink / raw)
To: Robert J. Chassell; +Cc: emacs-devel
Hi, Robert!
On Mon, Mar 17, 2008 at 12:49:27AM +0000, Robert J. Chassell wrote:
> Alan Mackenzie <acm@muc.de> asked
> Where "console" = ????
> /dev/tty2, also known by the Debian folks and others as a `virtual
> console'. It does not have X or any other windowing system and is
> what we once called a `terminal'.
> This problem is going to become really problematic if "shift-movement
> selection" becomes the Emacs default".
> Perhaps others expect a graphical windowing environment in all
> circumstances.
> When I SSH to gnu.org and log into it with an RXVT shell on my local
> machine, and invoke Emacs on fp.gnu.org, I can run C-M-S-v
> (scroll-other-window-down), that is to say, the shift key succeeds;
> but when I do the same in a plain console -- no RXVT shell -- I
> cannot.
In my last post when I said "GNU tty", I actually meant "Linux tty".
Sorry! (Who's been getting me confused between GNU and Linux? ;-)
There is actually a feature/bug/misfeature (I'd say bug), in
event-apply-modifier (simple.el), which forces C-a and C-A (possibly
with more modifiers) to be identical, namely 0x01. I've been using the
following function instead, which sets b25 (the <shift> bit) on C-S-a:
("kn" stands for Kalle Niemitalo, BTW, who worked out most of this stuff
~10 years ago).
(defun kn-event-apply-modifier (event symbol lshiftby prefix)
"Apply a modifier flag to event EVENT.
Unlike the core Emacs function `event-apply-modifier', when both
<control> and <shift> are modifying a\(n English\) letter in an
event, b25 is set (for shift), and the LSB contains C-<letter>.
SYMBOL is the name of this modifier, as a symbol.
LSHIFTBY is the bit position of the modifier bit; e.g. 25 means 0x2000000.
PREFIX is the string that represents this modifier in an event type symbol."
(if (numberp event)
(let ((letter (logand event 4194303))) ; 2^22 - 1
(if (eq symbol 'control)
(cond ((and (>= letter ?A) (<= letter ?Z))
(- (logior (lsh 1 25) event) ?A -1)) ; add <shift>
((and (>= letter ?a) (<= letter ?z))
(- event ?a -1))
((and (>= letter ?\C-a) (<= letter ?\C-z))) ; do nothing
(t (logior (lsh 1 lshiftby) event)))
(logior (lsh 1 lshiftby) event)))
(if (memq symbol (event-modifiers event))
event
(let ((event-type (if (symbolp event) event (car event))))
(setq event-type (intern (concat prefix (symbol-name event-type))))
(if (symbolp event)
event-type
(cons event-type (cdr event)))))))
> Robert J. Chassell
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-03-17 23:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-16 18:34 Shift on console Robert J. Chassell
2008-03-16 19:23 ` Alan Mackenzie
2008-03-17 0:49 ` Robert J. Chassell
2008-03-17 23:31 ` Alan Mackenzie
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.