Subject: bug#4814 keyboard and system bug with Emacs CVS current through 2009-10-15 on w32

From: MON KEY <[email-masked]>
Date: Tue, 2 Feb 2010 20:37:28 -0500

This bug remains outstanding through pretest 23.1.91.1 of 2010-01-02.
I've had an opportunity to examine the problem on that build as well.

Following is an attempt to identify and compare/contrast what I've been able to
deduce of the problem.

;;; ==============================
"GNU Emacs 23.1.91.1 (i386-mingw-nt5.1.2600)
 of 2010-01-02 on PRETEST"

Invoked with: emacs -Q

:NOTE The value of the map: (0 . [67108896]) in `local-function-key-map' does
not seem to have been present until after 07-2009.

The value 0x2ed76000 appears in my dribble-file and recent-keys output for all
``control'' key presses.

`key-translation-map' on `emacs-version'
=> (keymap (24 keymap (56 . iso-transl-ctl-x-8-map)))

`input-decode-map'
=> (keymap (27 keymap (C-backspace) (C-delete)) (C-M-backspace)
(C-M-delete) (M-backspace) (M-delete))

`local-function-key-map'
=> (keymap (backspace . [127]) (kp-delete . [4]) (delete . [4]) keymap
(S-tab . [backtab]) (S-iso-lefttab . [backtab]) (iso-lefttab .
[backtab]) (M-escape . [134217755]) (M-return . [134217741]) (M-clear
. [134217740]) (M-linefeed . [134217738]) (M-tab . [134217737])
(M-delete . [134217855]) (M-backspace . [134217855]) keymap (escape .
[27]) (return . [13]) (clear . [12]) (linefeed . [10]) (tab . [9])
(kp-equal . [61]) (kp-divide . [47]) (kp-decimal . [46]) (kp-subtract
. [45]) (kp-separator . [44]) (kp-add . [43]) (kp-multiply . [42])
(kp-enter . [13]) (kp-tab . [9]) (kp-space . [32]) (kp-9 . [57]) (kp-8
. [56]) (kp-7 . [55]) (kp-6 . [54]) (kp-5 . [53]) (kp-4 . [52]) (kp-3
. [51]) (kp-2 . [50]) (kp-1 . [49]) (kp-0 . [48]) (24 keymap (64
keymap (99 . event-apply-control-modifier) (83 .
event-apply-shift-modifier) (97 . event-apply-alt-modifier) (109 .
event-apply-meta-modifier) (115 . event-apply-super-modifier) (104 .
event-apply-hyper-modifier))) (0 . [67108896]) (C-S-kp-9 .
[C-S-prior]) (C-S-kp-8 . [C-S-up]) (C-S-kp-7 . [C-S-home]) (C-S-kp-6 .
[C-S-right]) (C-S-kp-4 . [C-S-left]) (C-S-kp-3 . [C-S-next]) (C-S-kp-2
. [C-S-down]) (C-S-kp-1 . [C-S-end]) (C-S-kp-prior . [C-S-prior])
(C-S-kp-up . [C-S-up]) (C-S-kp-home . [C-S-home]) (C-S-kp-right .
[C-S-right]) (C-S-kp-left . [C-S-left]) (C-S-kp-next . [C-S-next])
(C-S-kp-down . [C-S-down]) (C-S-kp-end . [C-S-end]) (S-kp-prior .
[S-prior]) (S-kp-up . [S-up]) (S-kp-home . [S-home]) (S-kp-right .
[S-right]) (S-kp-left . [S-left]) (S-kp-next . [S-next]) (S-kp-down .
[S-down]) (S-kp-end . [S-end]) (kp-delete . [127]) (delete . [127])
(backspace . [127]) (kp-insert . [insert]) (kp-begin . [begin])
(kp-end . [end]) (M-kp-next . [M-next]) (kp-next . [next]) (kp-prior .
[prior]) (kp-down . [down]) (kp-right . [right]) (kp-up . [up])
(kp-left . [left]) (kp-home . [home]))

`function-key-map'
=> (keymap (escape . [27]) (return . [13]) (clear . [12]) (linefeed .
[10]) (tab . [9]) (kp-equal . [61]) (kp-divide . [47]) (kp-decimal .
[46]) (kp-subtract . [45]) (kp-separator . [44]) (kp-add . [43])
(kp-multiply . [42]) (kp-enter . [13]) (kp-tab . [9]) (kp-space .
[32]) (kp-9 . [57]) (kp-8 . [56]) (kp-7 . [55]) (kp-6 . [54]) (kp-5 .
[53]) (kp-4 . [52]) (kp-3 . [51]) (kp-2 . [50]) (kp-1 . [49]) (kp-0 .
[48]) (24 keymap (64 keymap (99 . event-apply-control-modifier) (83 .
event-apply-shift-modifier) (97 . event-apply-alt-modifier) (109 .
event-apply-meta-modifier) (115 . event-apply-super-modifier) (104 .
event-apply-hyper-modifier))) (0 . [67108896]) (C-S-kp-9 .
[C-S-prior]) (C-S-kp-8 . [C-S-up]) (C-S-kp-7 . [C-S-home]) (C-S-kp-6 .
[C-S-right]) (C-S-kp-4 . [C-S-left]) (C-S-kp-3 . [C-S-next]) (C-S-kp-2
. [C-S-down]) (C-S-kp-1 . [C-S-end]) (C-S-kp-prior . [C-S-prior])
(C-S-kp-up . [C-S-up]) (C-S-kp-home . [C-S-home]) (C-S-kp-right .
[C-S-right]) (C-S-kp-left . [C-S-left]) (C-S-kp-next . [C-S-next])
(C-S-kp-down . [C-S-down]) (C-S-kp-end . [C-S-end]) (S-kp-prior .
[S-prior]) (S-kp-up . [S-up]) (S-kp-home . [S-home]) (S-kp-right .
[S-right]) (S-kp-left . [S-left]) (S-kp-next . [S-next]) (S-kp-down .
[S-down]) (S-kp-end . [S-end]) (kp-delete . [127]) (delete . [127])
(backspace . [127]) (kp-insert . [insert]) (kp-begin . [begin])
(kp-end . [end]) (M-kp-next . [M-next]) (kp-next . [next]) (kp-prior .
[prior]) (kp-down . [down]) (kp-right . [right]) (kp-up . [up])
(kp-left . [left]) (kp-home . [home]))

;;; ==============================

As per the initial bug report following are comparative output from an earlier
Emacs which functions as expected.  These are likewise for the unpatched version
from a similar period.

`emacs-version'
=> "GNU Emacs 23.1.50.1 (i386-mingw-nt5.1.2600)
 of 2009-06-30 on LENNART-69DE564 (patched)"

`key-translation-map'
=> (keymap {.. Lots of maps elided ...}
     (24 keymap (56 keymap (126 keymap (32 . "~") (126 . [172]) (116 .
[254]) (111 . [245]) (110 . [241]) (100 . [240]) (97 . [227]) (84 .
[222]) (79 . [213]) (78 . [209]) (68 . [208]) (65 . [195])) (124 .
[166]) (120 . [215]) (109 . [181]) (117 . [181]) (111 . [176]) (99 .
[162]) (96 keymap (32 . "`") (117 . [249]) (111 . [242]) (105 . [236])
(101 . [232]) (97 . [224]) (85 . [217]) (79 . [210]) (73 . [204]) (69
. [200]) (65 . [192])) (95 keymap (111 . [186]) (97 . [170])) (94
keymap (32 . "^") (117 . [251]) (111 . [244]) (105 . [238]) (101 .
[234]) (97 . [226]) (85 . [219]) (79 . [212]) (73 . [206]) (69 .
[202]) (65 . [194]) (51 . [179]) (50 . [178]) (49 . [185])) (89 .
[165]) (83 . [167]) (82 . [174]) (80 . [182]) (76 . [163]) (67 .
[169]) (63 . [191]) (62 . [187]) (61 . [175]) (60 . [171]) (51 keymap
(47 keymap (52 . [190]))) (49 keymap (47 keymap (52 . [188]) (50 .
[189]))) (47 keymap (111 . [248]) (101 . [230]) (97 . [229]) (79 .
[216]) (69 . [198]) (65 . [197]) (47 . [247])) (46 . [183]) (45 .
[173]) (44 keymap (99 . [231]) (67 . [199]) (44 . [184])) (43 . [177])
(36 . [164]) (39 keymap (32 . "'") (121 . [253]) (117 . [250]) (111 .
[243]) (105 . [237]) (101 . [233]) (97 . [225]) (89 . [221]) (85 .
[218]) (79 . [211]) (73 . [205]) (69 . [201]) (65 . [193]) (39 .
[180])) (34 keymap (32 . "\"") (121 . [255]) (117 . [252]) (115 .
[223]) (111 . [246]) (105 . [239]) (101 . [235]) (97 . [228]) (85 .
[220]) (79 . [214]) (73 . [207]) (69 . [203]) (65 . [196]) (34 .
[168])) (33 . [161]) (32 . [160]) (42 keymap (124 . [166]) (120 .
[215]) (109 . [181]) (117 . [181]) (111 . [176]) (99 . [162]) (89 .
[165]) (83 . [167]) (82 . [174]) (80 . [182]) (76 . [163]) (67 .
[169]) (63 . [191]) (62 . [187]) (61 . [175]) (60 . [171]) (46 .
[183]) (45 . [173]) (43 . [177]) (36 . [164]) (33 . [161]) (32 .
[160])))))

`function-key-map'
=> (keymap (kp-equal . [61]) (kp-divide . [47]) (kp-decimal . [46])
(kp-subtract . [45]) (kp-separator . [44]) (kp-add . [43])
(kp-multiply . [42]) (kp-enter . [13]) (kp-tab . [9]) (kp-space .
[32]) (kp-9 . [57]) (kp-8 . [56]) (kp-7 . [55]) (kp-6 . [54]) (kp-5 .
[53]) (kp-4 . [52]) (kp-3 . [51]) (kp-2 . [50]) (kp-1 . [49]) (kp-0 .
[48]) (24 keymap (64 keymap (99 . event-apply-control-modifier) (83 .
event-apply-shift-modifier) (97 . event-apply-alt-modifier) (109 .
event-apply-meta-modifier) (115 . event-apply-super-modifier) (104 .
event-apply-hyper-modifier))) (C-S-kp-9 . [C-S-prior]) (C-S-kp-8 .
[C-S-up]) (C-S-kp-7 . [C-S-home]) (C-S-kp-6 . [C-S-right]) (C-S-kp-4 .
[C-S-left]) (C-S-kp-3 . [C-S-next]) (C-S-kp-2 . [C-S-down]) (C-S-kp-1
. [C-S-end]) (C-S-kp-prior . [C-S-prior]) (C-S-kp-up . [C-S-up])
(C-S-kp-home . [C-S-home]) (C-S-kp-right . [C-S-right]) (C-S-kp-left .
[C-S-left]) (C-S-kp-next . [C-S-next]) (C-S-kp-down . [C-S-down])
(C-S-kp-end . [C-S-end]) (S-kp-prior . [S-prior]) (S-kp-up . [S-up])
(S-kp-home . [S-home]) (S-kp-right . [S-right]) (S-kp-left . [S-left])
(S-kp-next . [S-next]) (S-kp-down . [S-down]) (S-kp-end . [S-end])
(kp-delete . [127]) (delete . [127]) (backspace . [127]) (kp-insert .
[insert]) (kp-begin . [begin]) (kp-end . [end]) (M-kp-next . [M-next])
(kp-next . [next]) (kp-prior . [prior]) (kp-down . [down]) (kp-right .
[right]) (kp-up . [up]) (kp-left . [left]) (kp-home . [home]))

`local-function-key-map'
(keymap (backspace . [127]) (kp-delete . [4]) (delete . [4]) keymap
(S-tab . [backtab]) (S-iso-lefttab . [backtab]) (iso-lefttab .
[backtab]) (M-escape . [134217755]) (M-return . [134217741]) (M-clear
. [134217740]) (M-linefeed . [134217738]) (M-tab . [134217737])
(M-delete . [134217855]) (M-backspace . [134217855]) (escape . [27])
(return . [13]) (clear . [12]) (linefeed . [10]) (tab . [9]) (delete .
[127]) (backspace . [127]) keymap (kp-equal . [61]) (kp-divide . [47])
(kp-decimal . [46]) (kp-subtract . [45]) (kp-separator . [44]) (kp-add
. [43]) (kp-multiply . [42]) (kp-enter . [13]) (kp-tab . [9])
(kp-space . [32]) (kp-9 . [57]) (kp-8 . [56]) (kp-7 . [55]) (kp-6 .
[54]) (kp-5 . [53]) (kp-4 . [52]) (kp-3 . [51]) (kp-2 . [50]) (kp-1 .
[49]) (kp-0 . [48]) (24 keymap (64 keymap (99 .
event-apply-control-modifier) (83 . event-apply-shift-modifier) (97 .
event-apply-alt-modifier) (109 . event-apply-meta-modifier) (115 .
event-apply-super-modifier) (104 . event-apply-hyper-modifier)))
(C-S-kp-9 . [C-S-prior]) (C-S-kp-8 . [C-S-up]) (C-S-kp-7 . [C-S-home])
(C-S-kp-6 . [C-S-right]) (C-S-kp-4 . [C-S-left]) (C-S-kp-3 .
[C-S-next]) (C-S-kp-2 . [C-S-down]) (C-S-kp-1 . [C-S-end])
(C-S-kp-prior . [C-S-prior]) (C-S-kp-up . [C-S-up]) (C-S-kp-home .
[C-S-home]) (C-S-kp-right . [C-S-right]) (C-S-kp-left . [C-S-left])
(C-S-kp-next . [C-S-next]) (C-S-kp-down . [C-S-down]) (C-S-kp-end .
[C-S-end]) (S-kp-prior . [S-prior]) (S-kp-up . [S-up]) (S-kp-home .
[S-home]) (S-kp-right . [S-right]) (S-kp-left . [S-left]) (S-kp-next .
[S-next]) (S-kp-down . [S-down]) (S-kp-end . [S-end]) (kp-delete .
[127]) (delete . [127]) (backspace . [127]) (kp-insert . [insert])
(kp-begin . [begin]) (kp-end . [end]) (M-kp-next . [M-next]) (kp-next
. [next]) (kp-prior . [prior]) (kp-down . [down]) (kp-right . [right])
(kp-up . [up]) (kp-left . [left]) (kp-home . [home]))

:NOTE Above there isn't  a  keymap for `0'

`input-decode-map'
=> (keymap)

:NOTE Above the difference in modifiers.

/s_P\