How to assign (phisicaly) leds to [8-bit] register output, i mean
module reg4
(
input [4:0] key,
output [4:0] led
);
wire clk;
wire [4:1] d = ~ key [4:1];
global g (.in (~ key [0]), .out (clk));
reg [4:1] q;
always @(posedge clk)
q <= d;
assign led [0] = clk;
assign led [1] = q [1];
assign led [2] = q [2];
assign led [3] = q [3];
assign led [4] = q [4];
endmodule
This code is compilable, but doesn't work
You do that outside of Verilog. It is vendor-specific, and involves knowledge of the board you're using.
With Altera, for example, you edit connections in "Assignment editor" within Quartus suite, where you specify relations between top module's inputs/outpus and chip's pins, including pins configuration (i/o standard, drive strength, pullups usage, etc).
If you will be testing your code on some evaluation board or a devkit, consult with that board's manuals, or find empty/template project with all assignments already set, because you shouldn't assign pins arbitrarily. By misconfiguring pins assignments you can damage the hardware that is already soldered on the board, including fpga.