I want to set all C-x command to be M-x so I can keep my thumb in my left hand on ALT button.
But what is the function which C-h and C-x run?
Thanks.
['https://Stackoverflow.com/questions/19363489', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2767553/']
Control-X is bound to the function `Control-X-prefix`, which is a keymap (a table associating keystrokes with commands).

So to set `\M-x` to work like `\C-x`, just do the following:

```
(define-key global-map "\M-x" 'Control-X-prefix)

```

All that said, instead of rebinding emacs I would recommend that you look into remapping your keyboard: Many window managers (X11, OS X and many Windows set-ups included) give you ways to customize various modifier keys (e.g., turning Left-Alt into another Control.) Look into them, you may find a set up you like.
Use `C-x C-h` to see the `C-x` bindings. Load [`help-fns+.el`](http://www.emacswiki.org/emacs/download/help-fns%2b.el) and use `C-h M-k` with `ctl-x-map` and `help-map` to see all bindings for `C-x` and `C-h`.