The design may be valid for this specific case and scenario, but it does not mean it's very good one and will work in all level shifting scenarios you come acroass.
First of all, as the FPGA IO is not 5V tolerant, the voltage must be limited to a level near the IO supply that does not cause damage. The IO pins are equipped with clamping diodes to protect from overvoltage and they are rated to handle some level of current safely.
So in this design, it appears that the designers chose 270 ohm series resistors, so that a 5V signal is clamped to safe voltage level by the internal protection diodes while the resistor limits the current to a safe level the diode can handle.
But in this instance, it must be noted, that this specific method is for a specific type of interface, it might not be suitable for all 5V signals.
First of all, the PS/2 interface is an oldschool open-drain interface with pull-up resistors to 5V and uses TTL voltage levels. The keyboard could have for example 2k pull-up resistors to 5V, and as the interface is bi-directional, either device or host can pull the wires low.
As TTL levels are used, both devices should consider voltages below 0.8V as low and voltages above 2.0V as high.
When the FPGA pulls low, it should output less than 0.4V but it may be sufficient if FPGA can pull below 0.8V, so 2k pull-ups on keyboard are weak enough for the FPGA to keyboard communications.
When the keyboard pulls low, the voltage is not affected by the FPGA or series resistor, so it will go as low as keyboard pulls it with internal pull-ups, it should be below 0.8V.
But when neither party pulls low, the voltage needs to only be above 2V, so even if the FPGA used 1.8V, the clamping diodes would keep the bus voltage above 2V, and current is further limited by the 2k pull-ups on keyboard and the 270 ohm resistors on FPGA pins. So curren required to clamp pin voltage is in the ballpark of 1 to 2 milliamps.
So while this is possible, usually the normal design procedure is to not rely on internal clamping diodes, but it may be a viable solution for a specific problem you need to solve if everything in the chip datasheet supports the decision.