The standard function (dfhack "stonesense") opens a separate viewer window, which has read-only access to the game. It can follow the game view, or be moved independently.

As of June 2014, it is also possible to use Stonesense as a live overlay of the map in the main Dwarf Fortress window, replacing the usual 2D tiles. The DFHack command for this is "stonesense overlay". For best results, edit [segmentsize_z:2] in init.txt, and if you are unable to see the edges of the map with the overlay active try also decreasing or increasing the [segmentsize_XY] - normal values are 50 to 80 depending on screen resolution.

Mouse Controls

Left click

Move debug cursor (if available)

Scrollwheel

Move up and down

Right click

Recenter screen

Ctrl-Scroll

Increase/decrease Z depth shown

Keyboard controls

Movement controls

View Filters

F

Cycle Tracking Mode

F2

Toggle OSD overlay

Enter

Rotate view 90 degrees

D

Toggle Designations

R

Reload segment

I

Toggle Stocks

C

Chop walls

U

Toggle Zones

S

Toggle single layer

M

Toggle Creature Moods

. (Period)

Zoom in

P

Cycle Professions (off/icons/names)

, (Comma)

Zoom out

J

Cycle Jobs (off/icon/description)

Alt+(Arrow Key)

Offset view

N

Toggle Creatures Names

9

Decrease Z-layer

B

Toggle hidden tile transparency

0

Increase Z-layer

H

Toggle revealing hidden tiles (cheater! :P)

/

Toggle hotkey overlay

These lists of key bindings are not exhaustive. The most up-to-date and complete list can be found at the Stonesense Github page. The config file may also be edited to add additional keybindings to Stonesense.

If you just want to add existing content: The Stonesense Content Repository contains content packs that allow you to extend Stonesense functionality. These packs are made by members of the DF community.

If you want to tweak Stonesense's source code : Stonesense is one of the many DFHack plugins. It comes with DFHack's source code, and if you manage to compile DFHack, then you've managed to compile Stonesense.