How to type numbers while using pinyin input on a non-qwerty keyboard?
Could you use the numpad keys under fn? For example fn-J is numpad 1 and fn-K is numpad 2.

Edit: You might also use a private.xml private.xml like this with KeyRemap4MacBook:

&lt;?xml version="1.0"?&gt;
&lt;root&gt;
  &lt;item&gt;
    &lt;name&gt;test&lt;/name&gt;
    &lt;identifier&gt;test&lt;/identifier&gt;
    &lt;inputmode_only&gt;CHINESE_SIMPLIFIED, CHINESE_TRADITIONAL&lt;/inputmode_only&gt;
    &lt;autogen&gt;__KeyToKey__ KeyCode::KEY_0, VK_SHIFT, KeyCode::KEYPAD_0&lt;/autogen&gt;
    &lt;autogen&gt;__KeyToKey__ KeyCode::KEY_1, VK_SHIFT, KeyCode::KEYPAD_1&lt;/autogen&gt;
    &lt;autogen&gt;__KeyToKey__ KeyCode::KEY_2, VK_SHIFT, KeyCode::KEYPAD_2&lt;/autogen&gt;
    &lt;autogen&gt;__KeyToKey__ KeyCode::KEY_3, VK_SHIFT, KeyCode::KEYPAD_3&lt;/autogen&gt;
    &lt;autogen&gt;__KeyToKey__ KeyCode::KEY_4, VK_SHIFT, KeyCode::KEYPAD_4&lt;/autogen&gt;
    &lt;autogen&gt;__KeyToKey__ KeyCode::KEY_5, VK_SHIFT, KeyCode::KEYPAD_5&lt;/autogen&gt;
    &lt;autogen&gt;__KeyToKey__ KeyCode::KEY_6, VK_SHIFT, KeyCode::KEYPAD_6&lt;/autogen&gt;
    &lt;autogen&gt;__KeyToKey__ KeyCode::KEY_7, VK_SHIFT, KeyCode::KEYPAD_7&lt;/autogen&gt;
    &lt;autogen&gt;__KeyToKey__ KeyCode::KEY_8, VK_SHIFT, KeyCode::KEYPAD_8&lt;/autogen&gt;
    &lt;autogen&gt;__KeyToKey__ KeyCode::KEY_9, VK_SHIFT, KeyCode::KEYPAD_9&lt;/autogen&gt;
  &lt;/item&gt;
&lt;/root&gt;