From 766df0490c6da2b576ab5a98c9b7fa853eb13bd5 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 9 Nov 2014 11:42:06 +0000 Subject: [PATCH] small code simplification --- src/keys.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/keys.cc b/src/keys.cc index 4d6d5bc3..58292fd7 100644 --- a/src/keys.cc +++ b/src/keys.cc @@ -128,7 +128,7 @@ String key_to_str(Key key) else if (key.key >= Key::F1 and key.key < Key::F12) { named = true; - res = "F" + to_string((int)(Codepoint)key.key - (int)(Codepoint)Key::F1 + 1); + res = "F" + to_string((int)(key.key - Key::F1 + 1)); } else res = codepoint_to_str(key.key);