WebProWorld Dev Forum | how to create a forum website?? I want to help my niece to create a simple forum site, where she can discuss her school work with other students. How is it done? Is it impossible to develop by a 15 year old kid?
need help with smarterscript I'd like to add some coding to the smartersearch. Just not sure how to add the coding or what to code. Not looking for major changes, just small changes to how the affiliate is setup. If interested in helping me, please contact me via email or AIM at Bigcool23.
Is there an easy way to find out what this is? I have an associate who wants to help his customer achieve this function on his website. The problem is going to be how to manipulate Shop Factory to allow this to happen.
|
|
 |
Recent Articles | Magic Sysrq The "Magic Sysrequest key" is Alt (left or right Alt key) and Sysrq (up there under Print Screen, next to F12 on most keyboards).
Getconf "getconf" returns the value of certain system variables. According to the man page (which you may not have on your system) it queries system configuration variables which are either
Geoffrey Moore: The Role Of Open Source Computing I'm a little bit of a late arriver at this party. Personally, a late adopter. You want to catch up when you are late, but I don't think sobriety is your strongest suit.
Linspire Releases Five-0 More than a year in the making and with more than 1,200 improvements, the newest version of Linspire boasts enhancements in every core application and provides the most secure...
Controlling Linux Colors In Vi (vim) Because of an old application that apparently partially looks at termcap and partially hard-codes terminal info, a customer has to set TERM=ansi when using Alphacom to access his Linux box.
SSH Joins Novell's Technology Partner Program SSH Communications Security has joined Novell's Technology Partner Program and announced that SSH Tectia supports Novell's SUSE LINUX
Hardening Your Kernel With OpenWall The Openwall Project provides security related kernel patches for Linux and BSD kernels.
Novell To Harden Linux For Mission-Critical Operations Novell is releasing a range of Linux offerings for the enterprise to harden Linux for mission-critical operations.
IBM Takes On Linux IBM is launching a program to make Linux applications available across its whole line of hardware.
|
|
 |
| 05.11.05
Loadkeys, Dumpkeys
By A.P. Lawrence
You can change the output of the console keyboard with loadkeys. It's an extremely powerful command, and the man page can be confusing, but for simple use (which is often all we need it for), it's very easy.
For example, let's reprogram the F10 key:
echo 'string F10 = "foo" ' | loadkeys
See? That wasn't difficult. Oops, now what was the original value so we can put it back? Ahh, perhaps a little preparation would have been wise before changing that. The "dumpkeys" command does that:
dumpkeys > myfullkeymap
dumpkeys --funcs-only > funcsonlymap
The "funcs-only" map is short:
string F1 = "\033[[A"
string F2 = "\033[[B"
string F3 = "\033[[C"
string F4 = "\033[[D"
string F5 = "\033[[E"
string F6 = "\033[17~"
string F7 = "\033[18~"
string F8 = "\033[19~"
string F9 = "\033[20~"
string F10 = "\033[21~"
string F11 = "\033[23~"
string F12 = "033[24~"
string F13 = "\033[25~"
string F14 = "\033[26~"
string F15 = "\033[28~"
string F16 = "\033[29~"
string F17 = "\033[31~"
string F18 = "\033[32~"
string F19 = "\033[33~"
string F20 = "\033[34~"
string Find = "\033[1~"
string Insert = "\033[2~"
string Remove = "\033[3~"
string Select = "\033[4~"
string Prior = "\033[5~"
string Next = "\033[6~"
string Macro = "\033[M"
string Pause = "\033[P"
Yours will be different if you reprogrammed F10 above. Do this to put it back:
echo 'string F10 = "\033[21~" ' | loadkeys
If you had previously saved "funcsonlymap", you could put it all back with "loadkeys funcsonlymap" at any time, or simply use "loadkeys -d"
The full key map is much longer and can be confusing. The first thing you have to understand is how keyboards really work: they actually send a keycode (also called "scancodes"). The "A" key on your keyboard actually sends 30, and F10 sends 68. You can use "showkey" to see what keycodes are really being sent (just stop typing briefly and showkey will exit). In the full keymap dump, you'll find:
keycode 68 = F10         F22         Console_22 F34
alt     keycode   68 = Console_10
control alt     keycode   68 = Console_10
And later in the same file you'll find:
string F10 = "\033[21~"
The last one is easy to understand, but what does the first part mean? Well, it defines key symbols, "keysms" in the "man keymaps" explanation. It's position dependent: F10 is the unshifted key, F22 is the shifted F10, but then we start getting confusing. The main page does a lousy job explaining it:
Which of the actions bound to a given key is taken when it is pressed depends on what modifiers are in effect at that moment. The keyboard driver supports 8 modifiers. These modifiers are labeled (completely arbitrarily) Shift, AltGr, Control, Alt, ShiftL, ShiftR, CtrlL and CtrlR. Each of these modifiers has an associated weight of power of two according to the following table:
Sweet deals for iEntry members! Out with the old... if you have equipment that qualifies for trade-in, in with the new. Get a discount of up to $720* off the Web price on featured IBM(r) ThinkPad(r) notebooks. And ask about our battery offer. See full details of offer. Hurry! Offer valid from IBM in the US only through 3/28/05 or while supplies last. |
|
modifier | weight | Shift | 1 | AltGr | 2 | Control | 4 | Alt | 8 | ShiftL | 16 | ShiftR | 32 | ControlL | 64 | ControlR | 128 |
The effective action of a key is found out by adding up the weights of all the modifiers in effect. By default, no modifiers are in effect, so action number zero, i.e. the one in the first column in a key defini- tion line, is taken when the key is pressed or released. When e.g. Shift and Alt modifiers are in effect, action number nine (from the 10th column) is the effective one.
Changing the state of what modifiers are in effect can be achieved by binding appropriate key actions to desired keys. For example, binding the symbol Shift to a key sets the Shift modifier in effect when that key is pressed and cancels the effect of that modifier when the key is released. Binding AltGr_Lock to a key sets AltGr in effect when the key is pressed and cancels the effect when the key is pressed again. (By default Shift, AltGr, Control and Alt are bound to the keys that bear a similar label; AltGr may denote the right Alt key.)
Read the Rest of the Article.
*Originally published at APLawrence.com
About the Author: A.P. Lawrence provides SCO Unix and Linux consulting services http://www.pcunix.com
|