* Re: numeric keypad buttons [not found] ` <3F21BE5D.5070005@yahoo.com> @ 2003-07-26 20:56 ` Tobias Verbeke 2003-07-28 17:29 ` Kevin Rodgers 0 siblings, 1 reply; 13+ messages in thread From: Tobias Verbeke @ 2003-07-26 20:56 UTC (permalink / raw) Hi, Sorry to bother again. Problem still not solved. > Sorry, that should be (all caps) > > M-x getenv RET TERM RET > This gives xterm > > No, I was suggesting code to put in your ~/.emacs file as a > workaround. > I put it there, but this appeared not to solve the problem. I tried then to add these lines to xterm.el, thinking the gnome terminal could be some reincarnation of xterm, but it didn't work out either > > Should I have added an option while './configure'-ing > > in order to get that gnome.el ? > > > > Is it part of a package that I should install additionally? > > Not that I'm aware of. > Strange. I really can't find it. This is all I've got: apollo.el lk201.el sun-mouse.el vt100.elc vt400.el AT386.el mac-win.el sun-mouse.elc vt102.el vt420.el bg-mouse.el mac-win.elc sup-mouse.el vt125.el w32-win.el bg-mouse.elc news.el sup-mouse.elc vt200.el w32-win.elc bobcat.el pc-win.el tty-colors.el vt201.el wyse50.el internal.el pc-win.elc tty-colors.elc vt220.el xterm.el iris-ansi.el README tvi970.el vt240.el xterm.el~ keyswap.el sun.el tvi970.elc vt300.el x-win.el linux.el sun.elc vt100.el vt320.el x-win.elc I guess another terminal will have to do the job, then. Unless you have another idea to get this newbie take another step in the right direction. Thanks for the help, Tobias ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: numeric keypad buttons 2003-07-26 20:56 ` numeric keypad buttons Tobias Verbeke @ 2003-07-28 17:29 ` Kevin Rodgers 2003-07-29 13:27 ` Tobias Verbeke 0 siblings, 1 reply; 13+ messages in thread From: Kevin Rodgers @ 2003-07-28 17:29 UTC (permalink / raw) Tobias Verbeke wrote: > Kevin Rodgers wrote: >>Sorry, that should be (all caps) >> >> M-x getenv RET TERM RET > > This gives xterm Good. >>No, I was suggesting code to put in your ~/.emacs file as a >>workaround. > > I put it there, but this appeared not > to solve the problem. I tried then to > add these lines to xterm.el, thinking > the gnome terminal could be some reincarnation > of xterm, but it didn't work out either The gnome terminal (or the shell running in the terminal) is telling Emacs via the TERM environment variable that it is an xterm. I don't know whether that's correct or not, but since its sending unrecognized escape sequences for the keypad keys, I guess it's not -- but it's a problem that should be easy to work around. Making changes to the .el files distributed with Emacs is a not a good idea, because it is generally ineffective and complicates site maintenance. > I guess another terminal will have to do > the job, then. > Unless you have another idea to get this newbie take > another step in the right direction. Let's see if we can get the work around to actually work. Please post exactly what you added to your ~/.emacs. -- Kevin Rodgers ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: numeric keypad buttons 2003-07-28 17:29 ` Kevin Rodgers @ 2003-07-29 13:27 ` Tobias Verbeke 2003-07-29 13:55 ` Kai Großjohann 0 siblings, 1 reply; 13+ messages in thread From: Tobias Verbeke @ 2003-07-29 13:27 UTC (permalink / raw) [numeric keypad buttons don't behave as expected when running emacs --no-windows in a gnome terminal] > post exactly what you added to your ~/.emacs. Thanks for your reply. Here's my full .emacs. I added your solution at the very end of it. I'll summarize what I know about how the keys behave now (after installing GNU emacs 21.3.2 from source): I type: C-h l gives: C-h c gives: / ESC O o <kp-divide> is undefined * ESC O j <kp-multiply> is undefined - ESC O m <kp-add> is undefined + ESC O k <kp-subtract> is undefined Enter ESC O M <kp-enter> is undefined Thanks again for your help, Regards, Tobias ;; get rid of menu bar (menu-bar-mode nil) ;; font-lock everywhere (global-font-lock-mode 1) ;; latin-1 but with euro-sign (set-terminal-coding-system 'latin-9) (set-keyboard-coding-system 'latin-9) (set-language-environment 'latin-9) ;; AUCTeX (require 'tex-site) ;; edit Sweave files with LaTeX syntax (add-to-list 'auto-mode-alist '("\\.Stex\\'" . latex-mode)) ;; ESS (load "/home/tobias/documents/demografie/R/ESS/ess-5.1.24/lisp/ess-site")(s etq inferior-ess-program "R")(setq ess-ask-for-ess-directory nil) (setq ess-pre-run-hook '((lambda () (setq S-directory default-directory)))) (setq comint-scroll-to-bottom-on-output t) ;; Sweave ;;(defun Rnw-mode () ;; (require 'ess-noweb) ;; (noweb-mode) ;; (if (fboundp 'R-mode) ;; (setq noweb-default-code-mode 'R-mode))) ;;(add-to-list 'auto-mode-alist '("\\.Rnw\\'" . Rnw-mode)) ;;(add-to-list 'auto-mode-alist '("\\.Snw\\'" . Rnw-mode)) ;;(setq reftex-file-extensions ;; '(("Snw" "Rnw" "nw" "tex" ".tex" ".ltx") ("bib" ".bib"))) ;;(setq TeX-file-extensions ;; '(("Snw" "Rnw" "nw" "tex" "sty" "cls" "ltx" "texi" "texinfo")) ;; R. Gentleman vi behaviour ;;(setq blink-matching-paren t) ;;(global-set-key "%" 'match-paren) ;;(defun match-paren (arg) ;; "Go to the matching parenthesis if on parenthesis otherwise insert %.";; (interactive "p") ;; (cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1)) ;; ((looking-at "\\s\)") (forward-char 1) (backward-list 1)) ;; (t (self-insert-command (or arg 1))))) ;; solution num. keyp. prob in gnome-terminal (add-hook 'term-setup-hook (lambda () (define-key function-key-map "\eOo" [kp-divide]) (define-key function-key-map "\eOj" [kp-multiply]) (define-key function-key-map "\eOm" [kp-add]) (define-key function-key-map "\eOk" [kp-subtract]))) ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: numeric keypad buttons 2003-07-29 13:27 ` Tobias Verbeke @ 2003-07-29 13:55 ` Kai Großjohann 2003-07-29 14:23 ` Tobias Verbeke 0 siblings, 1 reply; 13+ messages in thread From: Kai Großjohann @ 2003-07-29 13:55 UTC (permalink / raw) Tobias Verbeke <tobias_verbeke@skynet.be> writes: > I type: C-h l gives: C-h c gives: > > / ESC O o <kp-divide> is undefined > * ESC O j <kp-multiply> is undefined > - ESC O m <kp-add> is undefined > + ESC O k <kp-subtract> is undefined > Enter ESC O M <kp-enter> is undefined Good. Now you can bind those keys: (global-set-key (kbd "<kp-divide>") 'forward-char) Does it work? -- ~/.signature ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: numeric keypad buttons 2003-07-29 13:55 ` Kai Großjohann @ 2003-07-29 14:23 ` Tobias Verbeke 2003-07-29 14:39 ` Tobias Verbeke 2003-07-29 16:17 ` Kai Großjohann 0 siblings, 2 replies; 13+ messages in thread From: Tobias Verbeke @ 2003-07-29 14:23 UTC (permalink / raw) > > I type: C-h l gives: C-h c gives: > > > > / ESC O o <kp-divide> is undefined > > * ESC O j <kp-multiply> is undefined > > - ESC O m <kp-add> is undefined > > + ESC O k <kp-subtract> is undefined > > Enter ESC O M <kp-enter> is undefined > > Good. Now you can bind those keys: > > (global-set-key (kbd "<kp-divide>") 'forward-char) > > Does it work? No, it did'nt work. Regards, Tobias ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: numeric keypad buttons 2003-07-29 14:23 ` Tobias Verbeke @ 2003-07-29 14:39 ` Tobias Verbeke 2003-07-29 16:18 ` Kai Großjohann 2003-07-29 16:17 ` Kai Großjohann 1 sibling, 1 reply; 13+ messages in thread From: Tobias Verbeke @ 2003-07-29 14:39 UTC (permalink / raw) > > > > (global-set-key (kbd "<kp-divide>") 'forward-char) > > > > Does it work? > > No, it did'nt work. > Sorry. I experimented a bit and it seems to work now. I binded it as follows (I should have been more explicit on what I wanted the key to represent): (global-set-key (kbd "\eOo") "\57") I hope this solution is clean, because it came into life with an ASCII table in front, but without the slightest emacs knowledge. Thanks a lot for your help both Kevin and Kai ! Regards, Tobias ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: numeric keypad buttons 2003-07-29 14:39 ` Tobias Verbeke @ 2003-07-29 16:18 ` Kai Großjohann 2003-07-29 17:08 ` Tobias Verbeke 0 siblings, 1 reply; 13+ messages in thread From: Kai Großjohann @ 2003-07-29 16:18 UTC (permalink / raw) Tobias Verbeke <tobias_verbeke@skynet.be> writes: > (global-set-key (kbd "\eOo") "\57") What does this do? I don't understand the \57 notation. -- ~/.signature ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: numeric keypad buttons 2003-07-29 16:18 ` Kai Großjohann @ 2003-07-29 17:08 ` Tobias Verbeke 2003-07-29 17:34 ` Kai Großjohann 0 siblings, 1 reply; 13+ messages in thread From: Tobias Verbeke @ 2003-07-29 17:08 UTC (permalink / raw) > > (global-set-key (kbd "\eOo") "\57") > > What does this do? I don't understand the \57 notation. I found this document: http://tiny-tools.sourceforge.net/emacs-keys.html it said somewhere: * Keys can be written by their ASCII code, using a backslash followed by up to six octal digits. This is the only way to represent keys with codes above \377. So I looked at this ascii table: http://web.cs.mun.ca/~michael/c/ascii-table.html and removed the zero's out of the octal notation (57 <- 0057) of the '/'-character (as it didn't work with the zero's in it: this gave me the '7'-character). And now the '/'-key on the numeric keypad produces a '/' as I wanted. So now for every button (/, *, -, +, Enter) there is an isolated line of the type: (global-set-key (kbd "\eOo") "\57") in .emacs I don't understand fully what I did and doubt I ever will, but it seemed to work. Cheers, Tobias ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: numeric keypad buttons 2003-07-29 17:08 ` Tobias Verbeke @ 2003-07-29 17:34 ` Kai Großjohann 2003-07-29 18:51 ` Tobias Verbeke 0 siblings, 1 reply; 13+ messages in thread From: Kai Großjohann @ 2003-07-29 17:34 UTC (permalink / raw) Tobias Verbeke <tobias_verbeke@skynet.be> writes: > And now the '/'-key on the > numeric keypad produces a '/' > as I wanted. Ah. Hm. So, (define-key function-key-map (kbd "ESC O o") (kbd "<kp-divide>")) (global-set-key (kbd "<kp-divide>") (kbd "/")) didn't do the trick? Hm. Or this: (define-key function-key-map (kbd "ESC O o") (kbd "/")) -- ~/.signature ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: numeric keypad buttons 2003-07-29 17:34 ` Kai Großjohann @ 2003-07-29 18:51 ` Tobias Verbeke 2003-07-30 13:58 ` Kai Großjohann 0 siblings, 1 reply; 13+ messages in thread From: Tobias Verbeke @ 2003-07-29 18:51 UTC (permalink / raw) > Ah. Hm. So, > > (define-key function-key-map (kbd "ESC O o") (kbd "<kp-divide>")) > (global-set-key (kbd "<kp-divide>") (kbd "/")) > > didn't do the trick? This works fine. > Hm. Or this: > > (define-key function-key-map (kbd "ESC O o") (kbd "/")) This works well too. Was my problem a problem ? I mean... Is what I encountered an irregularity or should I live in peace ? Cheers, Tobias ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: numeric keypad buttons 2003-07-29 18:51 ` Tobias Verbeke @ 2003-07-30 13:58 ` Kai Großjohann 0 siblings, 0 replies; 13+ messages in thread From: Kai Großjohann @ 2003-07-30 13:58 UTC (permalink / raw) Tobias Verbeke <tobias_verbeke@skynet.be> writes: >> Ah. Hm. So, >> >> (define-key function-key-map (kbd "ESC O o") (kbd "<kp-divide>")) >> (global-set-key (kbd "<kp-divide>") (kbd "/")) >> >> didn't do the trick? > > This works fine. Good. >> Hm. Or this: >> >> (define-key function-key-map (kbd "ESC O o") (kbd "/")) > > This works well too. Good. > Was my problem a problem ? I think you were just missing some of the pieces. For example, in the first alternative, you need both lines, just one of them won't do. (kbd "ESC O o") is just another way of writing "\eOo". I prefer the kbd syntax because (a) it's easier to read and (b) it corresponds to what C-h k and C-h l print. The first two lines in non-kbd syntax: (define-key function-key-map "\eOo" [kp-divide]) (global-set-key [kp-divide] "/") As you can see, it's a bit difficult to find the right symbols. -- ~/.signature ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: numeric keypad buttons 2003-07-29 14:23 ` Tobias Verbeke 2003-07-29 14:39 ` Tobias Verbeke @ 2003-07-29 16:17 ` Kai Großjohann 2003-07-29 17:40 ` Tobias Verbeke 1 sibling, 1 reply; 13+ messages in thread From: Kai Großjohann @ 2003-07-29 16:17 UTC (permalink / raw) Tobias Verbeke <tobias_verbeke@skynet.be> writes: > No, it did'nt work. ?? Weird. So, let me repeat slowly to be sure I'm understanding what is going on: you put stuff in term-setup-hook, and now C-h c tells you that Emacs is seeing the keypad / key as <kp-divide>. And then you (global-set-key (kbd "<kp-divide>") 'forward-char), and then, what does Emacs answer with C-h k <kp-divide> and also for <kp-divide> C-h l? Let me go back to make sure what it is that you were doing... -- ~/.signature ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: numeric keypad buttons 2003-07-29 16:17 ` Kai Großjohann @ 2003-07-29 17:40 ` Tobias Verbeke 0 siblings, 0 replies; 13+ messages in thread From: Tobias Verbeke @ 2003-07-29 17:40 UTC (permalink / raw) > ?? Weird. So, let me repeat slowly to be sure I'm understanding > what is going on: you put stuff in term-setup-hook, and now C-h c > tells you that Emacs is seeing the keypad / key as <kp-divide>. And > then you (global-set-key (kbd "<kp-divide>") 'forward-char), and > then, what does Emacs answer with C-h k <kp-divide> and also for > <kp-divide> C-h l? > > Let me go back to make sure what it is that you were doing... ------------------|-----------------|--------------------------| If I type this on | C-h l gives the | C-h c gives: | the numeric keypad| sequence: | | ------------------|--------------------------------------------- / | ESC O o |<kp-divide> is undefined | * | ESC O j |<kp-multiply> is undefined| - | ESC O m |<kp-add> is undefined | + | ESC O k |<kp-subtract> is undefined| Enter | ESC O M |<kp-enter> is undefined | __________________|_________________|__________________________| After having put this: (add-hook 'term-setup-hook (lambda() (global-set-key (kbd "<kp-divide") 'forward-char))) in .emacs, the following results: C-h k <kp-divide> ESC O o is undefined <kp-divide> C-h l ESC O o This is exactly the same when I put the single line: (global-set-key (kbd "<kp-divide>") 'forward-char) in .emacs Is my answer detailed enough for you to understand where my problem is (was) ? Thanks again for your answer, Tobias ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2003-07-30 13:58 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20030724224909.0f2725e5.tobias_verbeke@skynet.be> [not found] ` <3F21BE5D.5070005@yahoo.com> 2003-07-26 20:56 ` numeric keypad buttons Tobias Verbeke 2003-07-28 17:29 ` Kevin Rodgers 2003-07-29 13:27 ` Tobias Verbeke 2003-07-29 13:55 ` Kai Großjohann 2003-07-29 14:23 ` Tobias Verbeke 2003-07-29 14:39 ` Tobias Verbeke 2003-07-29 16:18 ` Kai Großjohann 2003-07-29 17:08 ` Tobias Verbeke 2003-07-29 17:34 ` Kai Großjohann 2003-07-29 18:51 ` Tobias Verbeke 2003-07-30 13:58 ` Kai Großjohann 2003-07-29 16:17 ` Kai Großjohann 2003-07-29 17:40 ` Tobias Verbeke
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).