wilensky@aaet.csc.ti.com (Harold Wilensky) (04/07/89)
Does anyone know how to make use of the function keys in Emacs running under Sunview? We would like assign functionality to some of the function keys but have not determined how to specify a function key. For example I would like to use global-set-key to make the F1 key do something. How do I specify the F1 key. --Harold Wilensky, TI
vail@tegra.UUCP (Johnathan Vail) (04/08/89)
I tried mail but it bounced: In article <8904062011.AA04566@aaet.> wilensky@aaet.csc.ti.com (Harold Wilensky) writes: Does anyone know how to make use of the function keys in Emacs running under Sunview? We would like assign functionality to some of the function keys but have not determined how to specify a function key. For example I would like to use global-set-key to make the F1 key do something. How do I specify the F1 key. --Harold Wilensky, TI The way I do it is M-x describe-key (which I bound to C-x?). Then hit the function key and look below the mode line. It will tell you what the sequence is like C-x*et for the F5 key. In my .emacs file I assign a few keys this way: (global-set-key "\C-x*bt" 'eval-defun) There is probably a better way but... Also be careful when you bind these as other packages may (and do) set them the way they want them. I use window-setup-hook to bind them, hopefully after everything else is loaded. BTW on my Sun the F1 key is trapped by sunview, I think caps lock or something stupid. I don't know how to untrap it. The other F keys and R keys are re-bindable I believe. I don't think the L keys are easy though.... Hope this helps... "The crux of the biscuit, is the apostrophe" -- This is the dog talking... _____ | | Johnathan Vail | tegra!N1DXG@ulowell.edu |Tegra| (508) 663-7435 | N1DXG @ 145.110-, 444.2+, 448.625- -----
jr@bbn.com (John Robinson) (04/10/89)
In article <468@atlas.tegra.UUCP>, vail@tegra (Johnathan Vail) writes: >In article <8904062011.AA04566@aaet.> wilensky@aaet.csc.ti.com (Harold Wilensky) writes: > For example I would like to use global-set-key to make the F1 key do > something. How do I specify the F1 key. > > --Harold Wilensky, TI > >The way I do it is M-x describe-key (which I bound to C-x?). > >Then hit the function key and look below the mode line. It will tell >you what the sequence is like C-x*et for the F5 key. This won't work if the sequence is unbound (some of it may end up in your buffer). Easier is to go to a buffer you don't mind trashing and type control-Q followed by the function key. The ESC will self-insert, followed by the rest of the sequence (which should all be printing chars). ESC will look like ^[ in the buffer. Another choice is to simply hit the function key (when looking at a trashable buffer) and then type ^H l (view lossage), which will show you a history of your recent keystrokes, printed in a "pretty" fashion. -- /jr jr@bbn.com or bbn!jr C'mon big money!