Clean the cucumbers and slice them thinly, peel the onions and cut into very thin rings. Put both in a bowl with a lid.
Make a sauce of peppercorns, salt, vinegar, sugar and dill, pour over the cucumbers and onions just before serving and shake vigorously in the closed bowl. If no appropriate bowl is available, it can also be stirred.