View Single Post
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#5
I feel like all of you failed to note exactly what the OP was confused about. Namely, how to actually EDIT the file (the only thing that logically makes sense when he says "enter the file"/"come in to the file"). Which, ironically enough, is not explicitly said in either the wiki or the blog post linked to above (someone needs to fix that. A lot of the documentation here assumes you know the most basic stuff about linux norms and common linux programs. But those of us who need the documentation most usually don't, at least not when we first get here).

So, in terminal (first make sure you have rootsh installed):

1. cd /usr/share/X11/xkb/symbols/nokia_vndr/
2. sudo gainroot
3. vi rx-51

Alternatively you can just type "sudo vi rx-51".

Furthermore, vi is a pain to use until you're used to it, so instead you can download Leafpad or anything that comes up as "text editor" or "source code editor" in the app manager. Then either run that instead of vi (for instance, "leafpad rx-51") after you've used the "cd" command to get to the right directory.

And if you're easily confused you can skip this, but you should be able to skip the cd command step and just do "vi /usr/share/X11/xkb/symbols/nokia_vndr/xr-51" as root (as in, by typing sudo at the beginning of that command or either sudo gainroot or root, enter, then the command).

- About vi itself -

When you're in vi, at first, you won't be able to edit anything. Don't press too many non-arrow keys or you may order vi to do something you don't want. Use the arrow keys to look around the file until you find what you want to edit. When you've done that, move the cursor to where you want to edit stuff and press "i". Not capital i, it has to be lowercase. You should now be able to type stuff. i will put you in inserting-text mode - you can also over-write individual characters right under your cursor by pressing "r", or enter text over-writing mode (to overwrite more than one character at once) with "R". You should still be able to use the arrow keys in these modes to move around, though I myself can only vouch for i. r and R I've never tried pressing arrow keys in that mode, mainly because I just like working with i.

When you've made the changes you want, Esc (should be on the bar in x-term) will take you out of the editing mode(s) and back into the 'command' mode. From here, if you're satisfied with your changes, you can type ":wq" (if that doesn't work, ":qw", I forget the order sometimes), and that will quit vi while saving what you wrote. (You can remember the command because w stands for 'write', q for 'quit'.) If you are not happy with your changes, either edit again, or, if you want to exit without saving, and cancel everything you changed, type ":q!".

Note to remember - the xr-51 file uses tabs instead of spaces, in between the text that defines the key mappings. Just so you don't accidentally use spaces. Also, make sure to back-up the rx-51 file, ideally somewhere far away from the system folders - I personally back stuff up to a folder on my MicroSD card, but somewhere in your MyDocs directory would do fine.

The copy command in xterm is cp, and you use it by typing in "cp [path and name of file being copied] [path of place it's being copied to]". Make sure to end the path of the place copied-to with a "/", or else you'll end up putting the file one directory above where you were trying to put it, and calling it the name of the folder you meant it to go in.
 

The Following 2 Users Say Thank You to Mentalist Traceur For This Useful Post: