View Single Post
Posts: 6 | Thanked: 12 times | Joined on Nov 2009 @ Rome, Italy
#178
Originally Posted by lowrider786 View Post
hello can someone please post a guide on how to edit the file wiicontrol in /usr/bin/ to make the 1 and 2 buttons work please

so far i have gained access to /usr/bin/ but i dont know what to do next to open the file and edit it please help
Here the easiest way to edit files remotelly from your computer using only graphical interface. Just connect to the N900 (via SHH) in 3 steps:

1) In the N900, install "OpenSSH Server" available in Maemo Extra repository (now called maemo.org) and note down password requested during the process:
http://maemo.org/downloads/product/M...penssh-server/

2) Check which is the IP of your N900 installing desktop widget "Personal IP Address":
http://maemo.org/downloads/product/M...al-ip-address/
Of course you can also use xterm command "ifconfig" after getting root access with "sudo gainroot", command requiring "Rootsh" application installed), but widget is easier.

3) From your PC, install WinSCP client and connect to the N900
http://winscp.net/
Use following details for connection:
  • Host name: IP address checked in step 2
  • User name: root
  • Password: the one noted down in step 1
  • Port number: 22
  • File protocol: SFTP
  • Allow SCP: checked
Of course if you have not a windows PC or you don't like WinSCP you can use any other SSH client, e.g. from Linux you will find directly searching in the repository.

Now you can manage your files easilly, e.g. you can jump to "/usr/bin" folder and right click on "wiicontrol" file to edit (I suggest after making a backup copy).

This is the part of code you can edit (e.g. to replace 'space' and 'Return' with other character to change buttons 1 and 2), you will find a similar section for each wiicontrol modality:
Code:
mapping={
    'U': ["a Left"],
    'D': ["a Right"],
    'L': ["a Down"],
    'R': ["a Up"],
    'A': ["k F4"],       # Application menu
    '+': ["k F7"],       # Zoom/volume +
    '-': ["k F8"],       # Zoom/volume -
    '1': ["a space"],       
    '2': ["a Return"],   
    'H': ["k Return"],              # Home button is broken. Do not use it
    'GU': ["a Up"],
    'GD': ["a Down"],
    'GL': ["a Left"],
    'GR': ["a Right"],
    'Z': ["a z"],        
    'C': ["a c"]    
    }

NOTE: However there should be no issue in the original wiicontrol file, I think you simply have a different keyboard layout, do you have full arrows key? If not you can just simulate the full arrow key changing the N900 hardware keyoboard setting to english, or typing following command in the xterminal:
Code:
setxkbmap us
To restore the original keyboard type this:
Code:
setxkbmap xx
(where xx is your layout, e.g. it for italy). See also http://talk.maemo.org/showthread.php?t=36680

Last edited by orientel; 2010-01-16 at 17:48.
 

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