In the code below. The keypad number 5 requires the addition of the char (in single qoutes) of the number to FL_KP but for the F5 key it requires an integer. This doesn't seem consistent. The 1.3.5 docs under Enumerations specify adding an int not a char. So is this a bug or a typo in the docs? See the test code below. BTW I know a char is interpreted as an int for addition but '5' != 5
#include <stdio.h>
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Button.H>
void foo(Fl_Widget* o){
printf("5 pressed\n");
}
int main() {
Fl_Window *window = new Fl_Window(200,200,300,300);
Fl_Button *b = new Fl_Button(0, 0, 130, 40,"keypad 5");
b->callback(foo);
b->shortcut(FL_KP+5); //does not work
//b->shortcut(FL_KP+'5'); //works when adding char
//b->shortcut(FL_F+5); // works when adding an int
//b->shortcut(FL_F+'5'); //does not work
window->end();
window->show();
return Fl::run();
}