Desk fit
GET /v1/desk-fit places a keyboard on a desk with its B key in front of the screen centre and a mousepad 3 cm to its side, then reports how the mousepad fits.
Query parameters
| Parameter | Example | Meaning |
|---|---|---|
keyboard | tkl | Required. A size id or keyboard id |
desk_width_cm | 120 | Required. Desk width, 30 to 400 cm |
mousepad | large | small 25×21, medium 36×30, large 45×40 (default), xl 49×42, deskmat 90×40 under keyboard and mouse, or custom |
mousepad_width_cm | 80 | Required when mousepad=custom |
cm_per_360 | 40 | Mouse sensitivity in cm per full turn; adds turn_360 to the result |
left_handed | true | Mousepad on the left of the keyboard |
keyboard_offset_cm | -5 | Move the keyboard from centred; negative moves it left |
Example
curl "https://api.hlplanet.com/v1/desk-fit?keyboard=tkl&desk_width_cm=120&mousepad=large&cm_per_360=40"
{
"keyboard": {
"kind": "size",
"id": "tkl",
"name": "TKL (tenkeyless) (80%)",
"size": "80%",
"keys": 87,
"width_mm": 368.6,
"depth_mm": 144.8,
"measured": false
},
"desk_width_cm": 120,
"mousepad": {
"type": "large",
"name": "Large mousepad (45 x 40 cm)",
"width_cm": 45
},
"left_handed": false,
"mouse_room_cm": 34,
"pad_fits": false,
"pad_spare_cm": -11,
"mouse_from_screen_centre_cm": 48.5,
"turn_360": {
"cm_per_360": 40,
"fits": true,
"short_by_cm": 0
},
"tip": {
"slide_keyboard_cm": 11,
"direction": "left"
},
"desk_too_narrow_by_cm": null,
"planner_url": "https://www.hlplanet.com/keyboard-layout/?compare=tkl,desk",
"notes": "The keyboard is placed with its B key in front of the screen centre, with 3 cm between keyboard and mousepad."
}
When the pad doesn't fit, tip says how far to slide the keyboard, or desk_too_narrow_by_cm says the desk is too small for both.