title: In simple gtk key press event example, GDK_SHIFT_MASK seems to be ignored
body: <p>Could someone please compile and execute the small sample code I provided below?  Please let me know if the shift key modifier works properly for you. This example is suppose to demonstrate the key press functionality in gtk.  It works fine for simple key presses and even works with the control key modifier, but it does not work with the shift key modifier.</p>
  
  <pre><code>/*
   * 
   * compile command:
   * 
   * gcc keypress3.c -o keypress3  `pkg-config --libs --cflags gtk+-2.0`
   * 
   */
  
  #include &lt;gtk/gtk.h&gt;
  #include &lt;gdk/gdkkeysyms.h&gt;
  
  gboolean
  on_key_press (GtkWidget *widget, GdkEventKey *event, gpointer user_data);
  
  int main (int argc, char *argv[])
  {
    GtkWidget *window;
  
    gtk_init (&amp;argc, &amp;argv);
  
    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  
    g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (gtk_main_quit), NULL);
    g_signal_connect (G_OBJECT (window), "key_press_event", G_CALLBACK (on_key_press), NULL);
  
    gtk_widget_show_all (window);
  
    gtk_main ();
  
    return 0;
  }
  
  gboolean
  on_key_press (GtkWidget *widget, GdkEventKey *event, gpointer user_data)
  {
    switch (event-&gt;keyval)
    {
      case GDK_p:
        printf("key pressed: %s\n", "p");
        break;
      case GDK_s:
        if (event-&gt;state &amp; GDK_SHIFT_MASK)
        {
          printf("key pressed: %s\n", "shift + s");
        }
        else if (event-&gt;state &amp; GDK_CONTROL_MASK)
        {
          printf("key pressed: %s\n", "ctrl + s");
        }
        else
        {
          printf("key pressed: %s\n", "s");
        }
        break;
      case GDK_m:
        if (event-&gt;state &amp; GDK_SHIFT_MASK)
        {
          printf("key pressed: %s\n", "shift + m");
        }
        else if (event-&gt;state &amp; GDK_CONTROL_MASK)
        {
          printf("key pressed: %s\n", "ctrl + m");
        }
        else
        {
          printf("key pressed: %s\n", "m");
        }
        break;
  
      default:
        return FALSE; 
    }
  
    return FALSE; 
  }
  </code></pre>
  
  <p>The output I am getting:</p>
  
  <pre><code>key pressed: m
  key pressed: ctrl + m
  key pressed: p
  key pressed: ctrl + s
  key pressed: s
  </code></pre>
  
  <p>I get nothing when I press  shift + s or shift + m, so it seems that I am not quite getting how the GDK_SHIFT_MASK should be used even though I have read the documentation and I have seen plenty of other examples where it appears to be used exactly the same way.</p>