The following solution shows the flex keypad connection line paths for easy tracing and check up procedures. This can be also used to locate where and which components needs to be check and or where can apply and put a jumper when there's a line being cut or open due to wet or water damaged.
In troubleshooting upper keypads you must first visually check the flex assembly for possible damaged, scratched or cut. A damaged flexible cable wire assembly needs to be replaced a new replacement spare.
However, if there is only one key that is not working except the END/POWER key, you may refer this solution below for it shows the connection line paths of the upper keypad keys board on the flex assembly.
Nokia X5-01 Upper Keypad Flex Line Connection Tracks
The next solution below can be used for further upper keypad keys breakdown or failure. This solution can be used if the keypad flex is already been tried installing a new replacement flex ribbon wire, for it shows the complete connection line paths from the flex pin connector to the keypad filter IC solder ball bumps.
Nokia X5-01 Keypad IC jumper ways and pin connector line tracks
If already tried installing a new flex cable wire but still the keypads keys still doesn't work, you may need to replace the Keypad filter IC located or mounted near the Flex pin connector. You can also temporarily apply the jumper solution just to determine if all the connection line paths is working okay.