Professional Web Applications Themes

Map Keyboard to Shell Command - Sun Solaris

How can i map a key such as F12 to run a command script? Thanks...

  1. #1

    Default Map Keyboard to Shell Command

    How can i map a key such as F12 to run a command script?

    Thanks
    Mike Guest

  2. #2

    Default Re: Map Keyboard to Shell Command

    net (Mike Wilson) writes in comp.unix.solaris:
    |How can i map a key such as F12 to run a command script?

    It depends on how you are accesing the system - read the docs for the
    terminal emulator or desktop environment you are using.

    --
    __________________________________________________ ______________________
    Alan Coopersmith calberkeley.org
    http://www.CSUA.Berkeley.EDU/~alanc/ aka: COM
    Working for, but definitely not speaking for, Sun Microsystems, Inc.
    Alan Guest

  3. #3

    Default Re: Map Keyboard to Shell Command

    [Alan Coopersmith]: 
    >
    > It depends on how you are accesing the system - read the docs for
    > the terminal emulator or desktop environment you are using.[/ref]

    for libXt based applications, use something like this:

    XTerm.VT100.Translations: #override \n\
    Ctrl <KeyPress> Up: scroll-back(1,halfpage) \n\
    Ctrl <KeyPress> Down: scroll-forw(1,halfpage) \n\
    Meta <KeyPress> Prior: scroll-back(1,halfpage) \n\
    Meta <KeyPress> Next: scroll-forw(1,halfpage) \n\
    <KeyPress> F11: string("exec bash\n") \n\
    <KeyPress> F12: string("PS1=': [\\u\\h \\w]; '\n") \n\
    Meta <KeyPress> comma: insert-selection(CUT_BUFFER0,PRIMARY)

    (that's X resources, you load them with xrdb.)
    --
    Kjetil T. | read and make up your own mind
    | http://www.cactus48.com/truth.html
    Kjetil Guest

Similar Threads

  1. How do i run shell command
    By Wiggins in forum PERL Beginners
    Replies: 2
    Last Post: August 31st, 03:38 PM
  2. running shell command within php
    By Andreas Paasch in forum PHP Development
    Replies: 3
    Last Post: November 12th, 10:00 PM
  3. exec shell command from php
    By Gal in forum PHP Development
    Replies: 4
    Last Post: October 2nd, 12:54 AM
  4. Using 'Shell' command in code.
    By Alex Mirzayanov in forum ASP.NET Web Services
    Replies: 1
    Last Post: September 19th, 08:54 AM
  5. executing a shell command within a function
    By Svlyp in forum PHP Development
    Replies: 0
    Last Post: August 16th, 12:19 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139