Re: keycode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 20Aug2016 14:55, Tom Horsley <horsley1953@xxxxxxxxx> wrote:
On Sat, 20 Aug 2016 20:47:43 +0200
Patrick Dupre wrote:
What are the recommendations ?

I seem to have luck putting .sh files in the directory
/etc/X11/xinit/xinitrc.d/

Of course, those files will run for all users (which
isn't a problem if there is only one user :-).

I think modern X11 honours ~/.xinitrc.d also. Certainly on this Mac (haven't got a handy Linux desktop to test with at present).

Be sure to make it an executable script with the #!/bin/sh
line at the top.

Indeed, if only to make your editor syntax aware. Though I think these files are sourced because you can set environment variables in them and have them stick. Eg source ~/.profile from one.

And yes, xmodmap is probably the go, _unless_ you want the key mapping to apply only to one app (eg xterm). To the latter, xterm has key mappings available in its .Xdefaults parameters. For example, my xterm stuff has this at the bottom:

   XTerm*.VT100.Translations:         #override \n\
       <KeyPress>F1               : string(0x1b) \n \
       <KeyPress>F10              : secure() \n \
       <KeyPress>KP_End           : scroll-forw(100,page) \n \
       <KeyPress>KP_Prior         : scroll-back(1,halfpage) \n \
       <KeyPress>KP_Next          : scroll-forw(1,halfpage) \n\
       <KeyPress>End              : scroll-forw(100,page) \n \
       Ctrl<KeyPress>Up           : scroll-back(1,line) \n \
       Ctrl<KeyPress>Down         : scroll-forw(1,line) \n\
       <KeyPress>Prior            : scroll-back(1,halfpage) \n \
       <KeyPress>Next             : scroll-forw(1,halfpage) \n\
       Meta<KeyPress>             : string(0x1b) insert() \n\
       Alt<KeyPress>              : string(0x1b) insert() \n\
       <KeyPress>BackSpace        : string(0x08) \n \
       Shift<Btn1Down>            : ignore() \n\
       Shift<Btn1Up>              : insert-selection(PRIMARY,CUT_BUFFER0)\n\
       <Btn2Down>             : ignore() \n\
       <Btn2Up>               : insert-selection(PRIMARY,CUT_BUFFER0)\n\
       Shift<Btn2Down>            : ignore() \n\
       Shift<Btn2Up>              : string("us ") insert-selection(PRIMARY,CUT_BUFFER0) string("\n") \n\
       ~Ctrl ~Meta<Btn3Down>          : ignore()\n\
       ~Ctrl ~Meta<Btn3Up>        : ignore()\n

   ! XTerm*VT100.translations:        #override Shift<Key>'F1':insert("hi guys")
   ! XTerm*VT100.translations:        #override Ctrl<Key>'U':uphalfscreen()\nCtrl<Key>'D'downhalfscreen()

Note that the last two lines are commented out experiments.

Cheers,
Cameron Simpson <cs@xxxxxxxxxx>
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://lists.fedoraproject.org/admin/lists/users@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux